1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-18 00:31:00 -05:00
This commit is contained in:
toast-ts 2024-03-01 19:12:18 +11:00
parent aca2d449c6
commit 2beead7022

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'}\``,