-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Features #21
Comments
Some thoughts:
const commands = {
'twitter': 'Check out my twitter at https://twitter.com/twitch! PogChamp',
'123': chatter => `Message: ${chatter.message}`
'points': async (chatter) => {
// Access to the chatter object
const points = await fetchPointsFromDatabase()
return `You have ${points} points ${chatter.username}!`
}
}
Bot.define(commands)
const Bot = new TwitchBot({
username: 'bot',
oauth: 'oauth:oauth-key-123',
channels: ['twitch'],
limit: 10 // Sets limit of 10 IRC messages per 30 seconds, or some other timespan
})
|
I think rate limiter is definitely a priority for anyone who wants to use this library in a production environment. Getting the core features done right on this bot might be more important than implementing extra features. It could be hard to gain adoption if people realize that they have to reimplement the core of the bot to make it more resilient. When receiving a message event, maybe we should have the chance to check if the Bot is currently being rate limited so that they can decide whether to continue further in their business logic or just to ignore the message? Questions:
|
Regarding message limits: https://dev.twitch.tv/docs/irc#irc-command-and-message-limits Regarding join limits: Such a limitation is definitely useful. For other features, maybe we should keep the "core" of the bot clean so we just implement all raw Twitch-Chat related message parsing and handling and then delegate additional features to a plugin-system? |
|
Hello
twitch-bot
users!This issue is for discussion around ideas/requests for new features, feel free to leave a comment if you have any thoughts 馃槃
The text was updated successfully, but these errors were encountered: