mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Fix
This commit is contained in:
@@ -22,7 +22,7 @@ module.exports = class FirstMessageCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { channel }) {
|
||||
if (channel.type === 'text' && !channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
|
||||
if (msg.guild && !channel.permissionsFor(this.client.user).has('READ_MESSAGE_HISTORY')) {
|
||||
return msg.reply(`Sorry, I don't have permission to read ${channel}...`);
|
||||
}
|
||||
const messages = await channel.messages.fetch({ after: 1, limit: 1 });
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = class UserCommand extends Command {
|
||||
• Discord Join Date: ${moment.utc(user.createdAt).format('MM/DD/YYYY h:mm A')}
|
||||
• ${user.bot ? 'Bot' : 'Not a Bot'}
|
||||
`;
|
||||
if (msg.channel.type === 'text') {
|
||||
if (msg.guild) {
|
||||
try {
|
||||
const member = await msg.guild.members.fetch(user.id);
|
||||
const defaultRole = msg.guild.roles.cache.get(msg.guild.id);
|
||||
|
||||
Reference in New Issue
Block a user