aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Kingsley McDonald <[email protected]>2018-10-27 14:23:37 +0100
committerGravatar Kingsley McDonald <[email protected]>2018-10-27 14:23:37 +0100
commit39f2a3a8808865a06224acc979840b6ad4c0ee01 (patch)
treec302fea47b0ad07f2fcc179bd48808d4bdd1cb33
parentMerge branch 'aliascog' into 'master' (diff)
Added site command and alias for rules.
-rw-r--r--bot/cogs/alias.py8
-rw-r--r--bot/cogs/site.py16
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))