Skip to content

Commit

Permalink
Release 4.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LewisHobden committed Apr 25, 2021
1 parent e405276 commit 00fe548
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [4.8.1] - 2021-04-25
### Features
- Updated the `!invite` command to also ask for slash commands permissions.
- Reinstated the log channel server, lost to the annals of git.

## [4.8.0] - 2021-04-25
### Slash Commands
Expand Down
14 changes: 14 additions & 0 deletions cogs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ class Config(commands.Cog):
def __init__(self, client: commands.Bot):
self.client = client

@cog_ext.cog_subcommand(base="config", name="logs",
description="Configures the logs channel for this server.",
options=[{"name": "channel", "description": "The channel for your log messages to be posted in.", "type": 7, "required": True}])
@commands.has_permissions(manage_guild=True)
async def _log_channel(self, ctx: SlashContext, log_channel: TextChannel):
channel_id = log_channel.id

guild_config = await GuildConfig.get_for_guild(ctx.guild.id)
guild_config.server_logs_channel_id = channel_id
guild_config.save()

embed = ConfigEmbed(guild_config=guild_config)
await ctx.send(content="Config has been updated.", embeds=[embed])

@cog_ext.cog_subcommand(base="config", name="points",
description="Configures the name of your points in this server.",
options=[{"name": "points", "description": "The custom name of your points, e.g. rupees.", "type": 3, "required": True}])
Expand Down

0 comments on commit 00fe548

Please sign in to comment.