Adding command logging and updating help methodfs
This commit is contained in:
parent
0d563a7e6f
commit
d137ecf61b
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ dragon_bot_env
|
|||||||
*.pyc
|
*.pyc
|
||||||
__pycache__
|
__pycache__
|
||||||
*.csv
|
*.csv
|
||||||
|
*env
|
||||||
|
11
app/bot.py
11
app/bot.py
@ -429,4 +429,15 @@ async def cleanup(ctx):
|
|||||||
return
|
return
|
||||||
await ctx.message.channel.purge(limit=num, check=is_discord_bot)
|
await ctx.message.channel.purge(limit=num, check=is_discord_bot)
|
||||||
|
|
||||||
|
|
||||||
|
@bot.event
|
||||||
|
async def on_command_completion(ctx):
|
||||||
|
channel = bot.get_channel(826547484632678453)
|
||||||
|
embed=discord.Embed(colour = discord.Color.green(), title = "Command Executed")
|
||||||
|
embed.add_field(name = "Command:", value = f"`{ctx.command}`")
|
||||||
|
embed.add_field(name = "User:", value = f"`{ctx.author}`", inline = False)
|
||||||
|
embed.add_field(name = "Channel:", value = f"{ctx.channel} **( <#{ctx.channel.id}> )**")
|
||||||
|
embed.add_field(name = "Server:", value = f"{ctx.guild} **( <#{ctx.channel.id}> )**")
|
||||||
|
await channel.send(embed=embed)
|
||||||
|
|
||||||
bot.run(TOKEN)
|
bot.run(TOKEN)
|
||||||
|
@ -178,9 +178,10 @@ def get_help_message(method):
|
|||||||
|
|
||||||
def get_help_embed(bot):
|
def get_help_embed(bot):
|
||||||
categories = {
|
categories = {
|
||||||
'fun': ['ffxiv', 'clap', 'redpanda', 'birb', 'youtube', 'dog', 'excuse', 'greentext', 'lewd', 'message', 'meme', 'homepage', 'pout', 'roll', 'smug', 'quake', 'wink', 'verify'],
|
'fun': ['ffxiv', 'clap', 'youtube', 'excuse', 'greentext', 'lewd', 'message', 'meme', 'homepage', 'pout', 'roll', 'smug', 'quake', 'wink', 'verify'],
|
||||||
'util': ['ask', 'corona', 'emoji', '8ball', 'decide', 'info', 'icon', 'wallpaper', 'stock', 'tts', 'issue'],
|
'util': ['ask', 'corona', 'emoji', '8ball', 'decide', 'info', 'icon', 'wallpaper', 'stock', 'tts', 'issue'],
|
||||||
'users': ['help', 'invite', 'purge', 'roles', 'source'],
|
'users': ['help', 'invite', 'purge', 'roles', 'source'],
|
||||||
|
'pictures of animals': ['birb', 'redpanda,' 'dale', 'dog', 'rat'],
|
||||||
'admin': ['cleanup']
|
'admin': ['cleanup']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
run_local.sh
Executable file
10
run_local.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
# Remove the running container so we cna re-use the container name 'dragon-bot'
|
||||||
|
printf "\n[-] Deleting old dragon-bot container from system\n"
|
||||||
|
docker rm -f dragon-bot
|
||||||
|
printf "[+] Done\n"
|
||||||
|
|
||||||
|
# Run that shit and mount the docker socket so it can talk to the sky-factory container
|
||||||
|
printf "\n[-] Pulling latest build of container\n"
|
||||||
|
docker pull ldooks/dragon-bot:latest
|
||||||
|
docker run -d --name dragon-bot -v /Users/lrobles/Dropbox/dale:/tmp/dale --env-file /Users/lrobles/Dropbox/code/my_projects/docker-containers/dragon-bot/env --restart always ldooks/dragon-bot:latest
|
||||||
|
printf "[+] Done\n"
|
Loading…
x
Reference in New Issue
Block a user