From 8501fb704eaaf667e82f12cc8dcc6ed2e9d10df9 Mon Sep 17 00:00:00 2001 From: Conatum Date: Mon, 24 Jan 2022 13:25:07 +0200 Subject: [PATCH] (meta): Add `support` and `invite` commands. --- bot/modules/meta/__init__.py | 1 + bot/modules/meta/links.py | 56 ++++++++++++++++++++++++++++++++++++ config/example-bot.conf | 3 ++ 3 files changed, 60 insertions(+) create mode 100644 bot/modules/meta/links.py diff --git a/bot/modules/meta/__init__.py b/bot/modules/meta/__init__.py index d1888a17..30289c0c 100644 --- a/bot/modules/meta/__init__.py +++ b/bot/modules/meta/__init__.py @@ -1,3 +1,4 @@ from .module import module from . import help +from . import links diff --git a/bot/modules/meta/links.py b/bot/modules/meta/links.py new file mode 100644 index 00000000..dc80a6d5 --- /dev/null +++ b/bot/modules/meta/links.py @@ -0,0 +1,56 @@ +import discord + +from meta import conf + +from LionContext import LionContext as Context + +from .module import module + + +@module.cmd( + "support", + group="Meta", + desc=f"Have a question? Join my [support server]({conf.bot.get('support_link')})" +) +async def cmd_support(ctx: Context): + """ + Usage``: + {prefix}support + Description: + Replies with an invite link to my support server. + """ + await ctx.reply( + f"Click here to join my support server: {conf.bot.get('support_link')}" + ) + + +@module.cmd( + "invite", + group="Meta", + desc=f"[Invite me]({conf.bot.get('invite_link')}) to your server so I can help your members stay productive!" +) +async def cmd_invite(ctx: Context): + """ + Usage``: + {prefix}invite + Description: + Replies with my invite link so you can add me to your server. + """ + embed = discord.Embed( + colour=discord.Colour.orange(), + description=f"Click here] to add me to your server: {conf.bot.get('invite_link')}" + ) + embed.add_field( + name="Setup tips", + value=( + "Remember to check out `{prefix}help` for the full command list, " + "and `{prefix}config info` for the configuration options.\n" + "[Click here]({guide}) for our comprehensive setup tutorial, and if you still have questions you can " + "join our support server [here]({support}) to talk to our friendly support team!" + ).format( + prefix=ctx.best_prefix, + support=conf.bot.get('support_link'), + guide="https://discord.studylions.com/tutorial" + ) + ) + await ctx.reply(embed=embed) diff --git a/config/example-bot.conf b/config/example-bot.conf index 0ac3142a..4cc55a85 100644 --- a/config/example-bot.conf +++ b/config/example-bot.conf @@ -19,6 +19,9 @@ topgg_password = topgg_route = topgg_port = +invite_link = https://discord.studylions.com/invite +support_link = https://discord.gg/StudyLions + [EMOJIS] lionyay = lionlove =