-
Notifications
You must be signed in to change notification settings - Fork 3
Reserve channels #58
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reserve channels #58
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this shouldnt be renamed seeming as the timestamp already comes after the last one
| import { client, getGuild } from '../client' | ||
| import { getSettings } from './queryDB' | ||
|
|
||
| const POOL_SIZE = 10 // Number of channels to keep in the pool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can make these editable with a command for dynamic load handling
| const guild = await getGuild() | ||
|
|
||
| console.log(`Creating ${channelsToCreate} channels for the pool...`) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will just get us rate limited - we should only create pool channels when there is less than x players in queue - add to pool when numbers are low, use pool when numbers are high
| const settings = await getSettings() | ||
|
|
||
| // Set up permissions for match users | ||
| const permissionOverwrites = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
turn off message history (we need this for all match creation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk how to do this lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but then we dont need to delete all the messages nescessarily, which might help with rate limiting (?)
No description provided.