1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 04:11:00 -04:00
This commit is contained in:
toast-ts 2024-03-01 19:12:18 +11:00
parent 8a67a6e602
commit e05b8b5129

View File

@ -77,6 +77,9 @@ export default class MP {
if (!DSS) return console.log('Endpoint failed - details');
const db = await client.MPServer.findInCache();
const server = db.find(x=>x.serverName === choiceSelector);
if (!server) return;
// Shouldn't throw "Cannot read properties of undefined" error now,
// but I hate people finding new ways to cause the bot to have a minor aneurysm
const dEmbed = new client.embed().setColor(client.config.embedColor).setAuthor({name: 'Crossplay server'}).setDescription(MessageTool.concatMessage(
`**Name:** \`${DSS.server?.name.length > 0 ? DSS.server.name : '\u200b'}\``,