Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
}
const channel = new FakeChannel({ id: 'fake', name: 'fake' }, guild, 100);
this.client.channelGuildMap[channel.id] = guild.id;
guild.channels.add(channel);
channel.listener = async data => {
console.log(data);
delete this.client.channelGuildMap[channel.id];
guild.channels.remove(channel);
await sendResponse({ data });
};
const args = content.args ? content.args.join(' ') : '';
const fakeMsg = new Message(
{
id: content.id,
content: `<@!${this.client.user.id}>${content.sudoCmd} ${args}`,
channel_id: channel.id,
author: this.client.users.get(content.authorId),
embeds: [],
attachments: [],
mentions: []
},
this.client
);
(fakeMsg as any).__sudo = true;
await this.client.cmds.onMessage(fakeMsg);
break;
case ShardCommand.OWNER_DM:
get() {
const message = (new Message({
channel_id: this.channelID,
type: this.type,
timestamp: this.timestamp,
content: this.content,
author: this.author,
mentions: this.mentions,
}, this.Atlas.client));
message.lang = this.lang;
return message;
}
};