join command

This commit is contained in:
Joonas 2023-02-01 17:39:00 +02:00
parent 86bf10b3d0
commit 8a513c89ef
1 changed files with 23 additions and 0 deletions

23
commands/join.js Normal file
View File

@ -0,0 +1,23 @@
const command = {
name: "join",
desc: "make the bot listen to a channel",
run: async (client, msg) => {
await client
.join(msg.senderUsername)
.then(() =>
client.say(
msg.channelName,
`${msg.displayName}, joined ${msg.senderUsername} BroBalt`
)
)
.then(() => client.say(msg.senderUsername, "MrDestructoid"))
.catch(() =>
client.say(
msg.channelName,
`${msg.displayName}, the bot is probably in your chat, but can't speak because of phone number etc verification`
)
);
},
};
export default { command };