-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (28 loc) · 1.06 KB
/
main.py
File metadata and controls
35 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import discord
from discord.ext import commands
from time import time
class Main(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def duck(self, ctx):
em = discord.Embed(title='A Duck')
em.set_image(url='https://random-d.uk/api/v2/randomimg?time=' + str(int(time())))
await ctx.send(embed=em)
@commands.command()
async def invite(self, ctx):
""" Gets the bots invite link """
await ctx.send(f'Invite me using this link <{self.bot.invite_url}>')
@commands.command()
async def ping(self, ctx):
""" Checks if the bot is working. """
await ctx.send('Pong!')
@commands.command()
async def info(self, ctx):
""" Gives info/credits on the bot. """
em = discord.Embed()
em.add_field(name="Owned by ", value="{{cookiecutter.author}}", inline=False)
em.add_field(name="Base written by ", value=f"[senseful#0009](https://github.com/stylite/ccbot)")
await ctx.send(embed=em)
def setup(bot):
bot.add_cog(Main(bot))