-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make bot suitable for multiple servers #67
base: main
Are you sure you want to change the base?
Conversation
5797424
to
a67b876
Compare
Currently known bug: The bot has to be fully restarted in order to use the live and roles channel in a server it has been added during runtime |
Adapt feature checker to database Adapt codebase to database
… a problem anymore See #68
Ask to authorize user whenever /permit command is used
## Deployment and contribution | ||
### Requirements |
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.
Add docker deployment explanation
… JSDoc for command permissions
Edge case: If a user types |
Refresh tokens sometimes do not get stored and the whole permission system doesn't seem to work as the restricted commands don't get any custom roles that are permitted to execute them |
streamers: [], | ||
refreshToken: '', | ||
}).catch(console.error); | ||
} else this.warning(`Limited features due to problems ${guildInfo}`); |
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.
Remove a guild from the safe guilds if there was a problem to make this function safe when re-executing
); | ||
} finally { | ||
if (!error) { | ||
DiscordClient._safeGuilds.push(guild); |
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.
Check if safe guilds doesn't already have this guild to make this function safe when re-executing
* @param data The data to insert or update | ||
*/ | ||
protected async upsert(tableName: string, data: T): Promise<void> { | ||
const id = data.id; |
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.
const id = data.id; | |
const { id } = data; |
if (i !== -1) { | ||
this.#cache[i].info = data; | ||
} else { | ||
this.#cache.push({ id, info: data }); | ||
} |
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.
if (i !== -1) { | |
this.#cache[i].info = data; | |
} else { | |
this.#cache.push({ id, info: data }); | |
} | |
if (i !== -1) | |
this.#cache[i].info = data; | |
else | |
this.#cache.push({ id, info: data }); |
@@ -1,5 +1,16 @@ | |||
# Trojaner Bot | |||
This is a [Discord](https://discord.com) bot currently only running on my [Discord server](https://discord.gg/NdsmmwV). There is no official way of adding this bot to your own Discord server. | |||
This is a [Discord](https://discord.com) bot currently only running on my [Discord server](https://discord.gg/NdsmmwV). To add this bot on your server, use the following link: |
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 is a [Discord](https://discord.com) bot currently only running on my [Discord server](https://discord.gg/NdsmmwV). To add this bot on your server, use the following link: | |
This is a [Discord](https://discord.com) bot currently only running on my [Discord server](https://discord.gg/NdsmmwV). To add this bot on your server, follow these steps: |
## Adding the bot to your server | ||
1. Click the following link: https://discord.com/api/oauth2/authorize?client_id=632637013475983360&permissions=8&scope=bot%20applications.commands | ||
- Note that the bot is added with admin privileges. You may alter the permissions value but keep in mind that some features might not work or lead to unexpected behavior | ||
2. (Optional, can be done later) Set up the following text-channels |
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.
2. (Optional, can be done later) Set up the following text-channels | |
2. (Optional, can be done later) Set up the following text-channels: |
/permit
command if required)