diff --git a/.gitlab/merge_request_templates/merge_request.md b/.gitlab/merge_request_templates/merge_request.md index 1f4a8f62..bd8f0b25 100755 --- a/.gitlab/merge_request_templates/merge_request.md +++ b/.gitlab/merge_request_templates/merge_request.md @@ -5,4 +5,7 @@ - How? * `briefly describe what this PR is doing to remedy the issue` - Why? - * `is there an open issue associated with this PR? if so, reference it with #56 (or whatever the issue number is)` \ No newline at end of file + * `is there an open issue associated with this PR? if so, reference it with #56 (or whatever the issue number is)` +- Is it...? + * [ ] Based? + * [ ] Dale-pilled? \ No newline at end of file diff --git a/app/bot.py b/app/bot.py old mode 100755 new mode 100644 index 600468ef..2e1e8332 --- a/app/bot.py +++ b/app/bot.py @@ -16,10 +16,7 @@ cogfiles = [ ] for cogfile in cogfiles: - try: - bot.load_extension(cogfile) - except Exception as e: - print(e) + bot.load_extension(cogfile) @bot.event diff --git a/app/cogs/server_utils.py b/app/cogs/server_utils.py index a63235c8..35662e40 100644 --- a/app/cogs/server_utils.py +++ b/app/cogs/server_utils.py @@ -1,6 +1,6 @@ from discord.ext import commands -import os import discord +import os class ServerUtils(commands.Cog): @@ -60,6 +60,7 @@ class ServerUtils(commands.Cog): return @commands.command() + @commands.has_permissions(administrator=True) async def timeout( self, ctx: commands.Context, @@ -68,9 +69,6 @@ class ServerUtils(commands.Cog): *, reason=None, ): - if not ctx.message.author.discriminator in ["2528", "4082"]: - return - import humanfriendly import datetime @@ -169,6 +167,46 @@ class ServerUtils(commands.Cog): await ctx.message.delete() await ctx.message.guild.leave() + @commands.command(name="vc") + @commands.has_permissions(administrator=True) + async def vc(self, ctx: commands.Context, *, channel_role_name): + # Check that the role/channel doesnt already exist + # returns either a string or None, so we'll proceed on the None condition + if discord.utils.find( + lambda r: r.name == channel_role_name, ctx.message.guild.roles + ): + await ctx.send( + ":x: A role named `%s` already exists :x:" % channel_role_name + ) + return + + # Create a role and assign it a random color + try: + role = await ctx.message.guild.create_role( + name=channel_role_name, + mentionable=True, + hoist=True, + color=discord.Color.random(), + ) + + overwrites = { + role: discord.PermissionOverwrite(connect=True, speak=True), + ctx.message.guild.default_role: discord.PermissionOverwrite( + connect=False + ), + } + + await ctx.message.guild.create_voice_channel( + name=channel_role_name, bitrate=96000, overwrites=overwrites + ) + + await ctx.send( + ":white_check_mark: Created a role + voice channel for %s" + % role.mention + ) + except Exception as e: + await ctx.send(":x: Error: %s :x:" % e) + @commands.command(name="help") async def help(self, ctx: commands.Context, method): diff --git a/app/help_methods.py b/app/help_methods.py index 6a174898..fe2a0b4f 100755 --- a/app/help_methods.py +++ b/app/help_methods.py @@ -178,6 +178,11 @@ def get_help_message(method): "\nUsage: !youtube sick bmx tricks", ], "wink": ["returns a anime girl winking at you", "\nUsage: !wink"], + "vc": [ + "Creates a role and voice channel named whatever you pass in. Only takes one argument\n", + "\nGives the role permissions to enter the voice channel\n" + "\nUsage: !vc some_role_name", + ], "verify": [ "Adds the twitter blue check mark to the previous message\n", "\nLiterally thats all it does\n" "\nUsage: !verify", @@ -190,40 +195,41 @@ def get_help_message(method): def get_help_embed(bot): categories = { "fun": [ - "nft", "bf5", - "ffxiv", "clap", - "youtube", "excuse", + "ffxiv", "greentext", - "lewd", - "message", - "meme", "homepage", + "horny", + "lewd", + "meme", + "message", + "nft", + "owo", "pout", "roll", - "smug", - "owo", - "wink", - "verify", - "horny", - "wasted", "simp", + "smug", "trackdays", + "verify", + "wasted", + "wink", + "youtube", ], "util": [ + "8ball", "ask", "corona", - "emoji", - "8ball", "decide", - "info", + "emoji", "icon", - "wallpaper", + "info", + "issue", "stock", "tts", - "issue", + "vc", + "wallpaper", ], "users": ["help", "invite", "purge", "roles", "source"], "pictures of animals": [ diff --git a/helm/values.yaml b/helm/values.yaml index 1839e685..de44e3a4 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: # Overrides the image tag whose default is the chart appVersion. - tag: "171" + tag: "172" repository: ldooks/dragon-bot pullPolicy: IfNotPresent