twitch_bot/commands/join.js
2023-02-01 23:11:48 +02:00

24 lines
625 B
JavaScript

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`
)
);
},
};
module.exports = { command };