Skip to content

Commit

Permalink
Hotfixes from Testing Session (#183)
Browse files Browse the repository at this point in the history
* Remove reference to deprecated function

* Move music channel management commands to their own group to avoid falling into channel checking problems

* Fixed an issue caused by moving default_role_id to its own table from Guild_info

* Fixed an issue where a VM child would not be created if the Parent VC was joined from another VM Child

* Correct musicchannel command in README

* Fixed an issue where youtu.be links would not work

* Fixed an issue where songs would not play when supplying the URL directly

* Added missing doc strings for EventCategoriesCog functions

Co-authored-by: Laura Demkowicz-Duffy <laura@laurademkowiczduffy.co.uk>
Co-authored-by: Fluxticks <benjigarment.appdev@gmail.com>
  • Loading branch information
3 people authored Aug 30, 2021
1 parent 3316c40 commit 7afa958
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 225 deletions.
136 changes: 68 additions & 68 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,70 +67,70 @@ $ source secrets.env
```bash
$ cd src
```
5. Install all the requirements for python:
```bash
pip install -r requirements.txt
```
6. Run the bot:
```bash
python3 main.py
```
## Current Functions
The list below describes the different "Cogs" of the bot, their associated commands, and any additional information required to set them up.
<details>
<summary>Voicemaster</summary>
### Voicemaster
#### !setvmmaster <channel_id>
* Make the given ID a Voicemaster master.
#### !getvmmasters * Get all the Voicemaster masters in the server.
#### !removevmmaster <channel_id>
* Remove the given ID as a Voicemaster master.
#### !removeallmasters * Remove all Voicemaster masters from the server.
#### !killallslaves * Kill all the Voicemaster slave channels in the server.
#### !lockvm * Locks the Voicemaster slave you're currently in to the number of current members.
#### !unlockvm * Unlocks the Voicemaster slave you're currently in.
</details>
<details>
<summary>Default Role</summary>
### Default role
#### !setdefaultroles <role_mention | role_id> * Sets the roles that the server gives to members when they join the server.
#### !getdefaultroles * Gets the current default roles set for the server.
#### !removedefaultroles * Removes the current default roles for the server.
</details>
<details>
<summary>Log Channel</summary>
### Log Channel
#### !setlogchannel <channel_mention | channel_id> * Set the log channel to the #'ed channel or given role ID.
#### !getlogchannel * Gets the current log channel value.
#### !removelogchannel * Removes the current log channel value.
</details>
<details>
<summary>Administrator Tools</summary>
### Administrator Tools
Adds a few commands useful for admin operations.
#### !clear_message * Aliases: `cls, purge, delete`
* Clear the specified number of messages from the current text channel.
#### !members
5. Install all the requirements for python:
```bash
pip install -r requirements.txt
```
6. Run the bot:
```bash
python3 main.py
```

## Current Functions
The list below describes the different "Cogs" of the bot, their associated commands, and any additional information required to set them up.

<details>
<summary>Voicemaster</summary>

### Voicemaster
#### !setvmmaster <channel_id>
* Make the given ID a Voicemaster master.

#### !getvmmasters * Get all the Voicemaster masters in the server.

#### !removevmmaster <channel_id>
* Remove the given ID as a Voicemaster master.

#### !removeallmasters * Remove all Voicemaster masters from the server.

#### !killallslaves * Kill all the Voicemaster slave channels in the server.

#### !lockvm * Locks the Voicemaster slave you're currently in to the number of current members.

#### !unlockvm * Unlocks the Voicemaster slave you're currently in.
</details>

<details>
<summary>Default Role</summary>

### Default role
#### !setdefaultroles <role_mention | role_id> * Sets the roles that the server gives to members when they join the server.

#### !getdefaultroles * Gets the current default roles set for the server.

#### !removedefaultroles * Removes the current default roles for the server.
</details>

<details>
<summary>Log Channel</summary>

### Log Channel
#### !setlogchannel <channel_mention | channel_id> * Set the log channel to the #'ed channel or given role ID.

#### !getlogchannel * Gets the current log channel value.

#### !removelogchannel * Removes the current log channel value.
</details>

<details>
<summary>Administrator Tools</summary>

### Administrator Tools
Adds a few commands useful for admin operations.
#### !clear_message * Aliases: `cls, purge, delete`
* Clear the specified number of messages from the current text channel.

#### !members
* List the current number of members in the server.

#### !remove-cog \<cog name>
Expand Down Expand Up @@ -439,22 +439,22 @@ For this cog to work, the `GOOGLE_API` env var must also be set, and instruction
1. Click on `Create Credentials` and then `API key`.
1. Copy the key given. For security, it is recommended that you "restrict key" and only enable `YouTube Data API v3`.

#### !music channel set \<channel mention> [optional: [args]]
#### musicchannel set \<channel mention> [optional: [args]]

* This sets the channel mentioned to be used as the music channel. All messages into this channel will be considered music requests, and any music commands must be sent in this channel.
* Optional args:
* Using `-c` will clear the entire channel before setting it up as the music channel.
* *Requires `administrator` permission in Discord*

#### !music channel get
#### musicchannel get
* Sends the currently set music channel for the server.
* *Requires `administrator` permission in Discord*

#### !music channel reset
#### musicchannel reset
* This clears the current music channel and resets the preview and queue messages.
* *Requires `administrator` permission in Discord*

#### !music channel remove
#### musicchannel remove

* Unlinks the currently linked music channel from being the music channel. This will not delete the channel or its contents.
* *Requires `administrator` permission in Discord*
Expand Down
2 changes: 1 addition & 1 deletion src/esportsbot/cogs/DefaultRoleCog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from esportsbot.base_functions import role_id_from_mention
from esportsbot.db_gateway import DBGatewayActions
from esportsbot.models import Guild_info, Default_roles
from esportsbot.base_functions import role_id_from_mention, send_to_log_channel
from esportsbot.base_functions import role_id_from_mention


class DefaultRoleCog(commands.Cog):
Expand Down
Loading

0 comments on commit 7afa958

Please sign in to comment.