botpy
This commit is contained in:
28
c/testc.py
Normal file
28
c/testc.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import discord
|
||||
from discord.ext import commands
|
||||
from discord.ext.commands import has_permissions, Context
|
||||
import time
|
||||
import random
|
||||
|
||||
class Testc(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.last_member = None
|
||||
|
||||
@commands.command()
|
||||
async def say(self, context: Context, *args):
|
||||
"""
|
||||
Repeats your message
|
||||
|
||||
"""
|
||||
await context.send(allowed_mentions=discord.AllowedMentions(roles=False, users=False, everyone=False), content=" ".join(args))
|
||||
await context.message.delete()
|
||||
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_ready(self):
|
||||
print('Testc cog has been loaded')
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Testc(bot))
|
||||
Reference in New Issue
Block a user