- Gave the package a descriptive name.
- Passed over with black once more.
- Created setup.py to install dependencies.
- Updated author to reflect repo ownership to Dusty.
- Changed `git` command to use the __url__ attribute.
- Changed music to use ogg vorbis instead of mp3, purely for
performance.
- Tried to make sure nothing broke.
- Updated dockerfile. Pretty sure we don't need it though...
27 lines
535 B
Python
27 lines
535 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from discord.ext import commands
|
|
import discord
|
|
|
|
|
|
class CogName:
|
|
"""
|
|
CogName should be the name of the cog
|
|
"""
|
|
|
|
def __init__(self, bot):
|
|
self.bot = bot
|
|
|
|
@commands.command()
|
|
async def ping(self, ctx):
|
|
"""Say pong"""
|
|
now = ctx.message.created_at
|
|
msg = await ctx.send("Pong")
|
|
sub = msg.created_at - now
|
|
await msg.edit(content=f"🏓Pong, **{sub.total_seconds() * 1000}ms**")
|
|
|
|
|
|
def setup(bot):
|
|
bot.add_cog(CogName(bot))
|