diff options
| -rw-r--r-- | bot/cogs/alias.py | 8 | ||||
| -rw-r--r-- | bot/cogs/site.py | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py index 940bdaa43..7b342a2d0 100644 --- a/bot/cogs/alias.py +++ b/bot/cogs/alias.py @@ -85,6 +85,14 @@ class Alias: await self.invoke(ctx, "site faq") + @command(name="rules", hidden=True) + async def site_rules_alias(self, ctx): + """ + Alias for invoking <prefix>site rules. + """ + + await self.invoke(ctx, "site rules") + @command(name="reload", hidden=True) async def reload_cog_alias(self, ctx, *, cog_name: str): """ diff --git a/bot/cogs/site.py b/bot/cogs/site.py index e5fd645fb..442e80cd2 100644 --- a/bot/cogs/site.py +++ b/bot/cogs/site.py @@ -92,6 +92,22 @@ class Site: await ctx.send(embed=embed) + @site_group.command(name="rules") + async def site_rules(self, ctx: Context): + """Info about the server's rules.""" + + url = f"{URLs.site_schema}{URLs.site}/about/rules" + + embed = Embed(title="Rules") + embed.set_footer(text=url) + embed.colour = Colour.blurple() + embed.description = ( + f"The rules and guidelines that apply to this community can be found on our [rules page]({url}). " + "We expect all members of the community to have read and understood these." + ) + + await ctx.send(embed=embed) + def setup(bot): bot.add_cog(Site(bot)) |