mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-25 17:28:43 -05:00
parent
fa82610469
commit
df8d258446
@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- The ability to answer ❓ to a HamStudy question to get the answer.
|
||||
- The list of available prefixes to `?help` when there is more than one.
|
||||
- `?donate` command to show ways to support qrm's development.
|
||||
- `?invite` command to invite qrm to your server.
|
||||
### Changed
|
||||
- New colour theme for `?greyline`.
|
||||
- Moved great circle distance and bearing calculation from `?ungrid` to `?griddistance`.
|
||||
|
10
exts/base.py
10
exts/base.py
@ -125,6 +125,8 @@ class BaseCog(commands.Cog):
|
||||
"Ko-Fi": "https://ko-fi.com/miaowware",
|
||||
"LiberaPay": "https://liberapay.com/miaowware",
|
||||
}
|
||||
self.bot_invite = (f"https://discordapp.com/oauth2/authorize?client_id={self.bot.user.id}"
|
||||
f"&scope=bot&permissions={opt.invite_perms}")
|
||||
|
||||
@commands.command(name="info", aliases=["about"])
|
||||
async def _info(self, ctx: commands.Context):
|
||||
@ -212,6 +214,14 @@ class BaseCog(commands.Cog):
|
||||
embed.add_field(name=title, value=url, inline=False)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@commands.command(name="invite", enabled=opt.enable_invite_cmd)
|
||||
async def _invite(self, ctx: commands.Context):
|
||||
"""Generates a link to invite the bot to a server."""
|
||||
embed = cmn.embed_factory(ctx)
|
||||
embed.title = "Invite qrm to Your Server!"
|
||||
embed.description = self.bot_invite
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@commands.command(name="echo", aliases=["e"], category=cmn.cat.admin)
|
||||
@commands.check(cmn.check_if_owner)
|
||||
async def _echo(self, ctx: commands.Context,
|
||||
|
@ -46,6 +46,12 @@ exts = [
|
||||
"propagation",
|
||||
]
|
||||
|
||||
# enable a command that provides a link to add the bot to a server
|
||||
enable_invite_cmd = True
|
||||
|
||||
# the default permissions for the bot, to be included in the invite link for ?invite
|
||||
# this probably does not need to be changed
|
||||
invite_perms = 67488832
|
||||
|
||||
# Either "time", "random", or "fixed" (first item in statuses)
|
||||
status_mode = "fixed"
|
||||
|
Loading…
Reference in New Issue
Block a user