mirror of
https://github.com/miaowware/qrm2.git
synced 2025-04-11 05:58:31 -04:00
Added the info command
- Now you can't say that you don't know where is the source >:(
This commit is contained in:
parent
eaace87517
commit
a66dcb64e2
16
info.py
16
info.py
@ -2,11 +2,19 @@
|
||||
Static info about the bot.
|
||||
---
|
||||
|
||||
`authors`: The authors of the bot.
|
||||
`description`: A description of the bot.
|
||||
`release_timestamp`: When the bot was last released.
|
||||
`authors`: The authors of the bot.
|
||||
|
||||
`description`: A description of the bot.
|
||||
|
||||
`license`: The license the bot is released under.
|
||||
|
||||
`contrubuting`: Info on how to contribute to the bot.
|
||||
|
||||
`release_timestamp`: When the bot was last released.
|
||||
"""
|
||||
|
||||
authors = ("@ClassAbbyAmplifier#2229", "@eyyyyyy#0006")
|
||||
authors = ("@ClassAbbyAmplifier#2229", "@0x5c")
|
||||
description = """A description goes here."""
|
||||
license = "A license goes here."
|
||||
contributing = "Info on contributing goes here."
|
||||
release_timestamp = "not yet :P"
|
||||
|
27
main.py
27
main.py
@ -6,6 +6,8 @@ Qrm, a bot for Discord
|
||||
[copyright here]
|
||||
"""
|
||||
|
||||
from types import SimpleNamespace
|
||||
|
||||
import discord
|
||||
import discord.ext.commands as commands
|
||||
|
||||
@ -14,11 +16,30 @@ import info
|
||||
import options as opt
|
||||
import keys
|
||||
|
||||
# --- Variables ---
|
||||
debug_mode = opt.debug
|
||||
|
||||
bot = commands.Bot(command_prefix=opt.prefix, description=info.description)
|
||||
# --- Global settings ---
|
||||
|
||||
debug_mode = opt.debug # Separate assignement in-case we define an override (ternary operator goes here)
|
||||
|
||||
|
||||
bot_colours = SimpleNamespace(good=0x2dc614, neutral=0x2044f7, bad=0xc91628)
|
||||
|
||||
|
||||
# --- Bot setup ---
|
||||
|
||||
bot = commands.Bot(command_prefix=opt.prefix, description=info.description, help_command=commands.MinimalHelpCommand())
|
||||
|
||||
|
||||
# --- Commands ---
|
||||
|
||||
@bot.command(name="info", aliases=["about"])
|
||||
async def _info(ctx):
|
||||
"""Shows info about qrm."""
|
||||
embed = discord.Embed(title="About qrm", description=info.description, colour=bot_colours.neutral)
|
||||
embed = embed.add_field(name="Authors", value=", ".join(info.authors))
|
||||
embed = embed.add_field(name="Contributing", value=info.contributing)
|
||||
embed = embed.add_field(name="License", value=info.license)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
try:
|
||||
bot.run(keys.discord_token)
|
||||
|
Loading…
Reference in New Issue
Block a user