twitch_bot/commands/join.js

25 lines
646 B
JavaScript

const command = {
name: "join",
desc: "make the bot listen to a channel",
restricted: false,
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 };