discordbot/cogs/helloworld_cog.py

14 lines
361 B
Python

import discord
from discord.ext import commands
class HelloWorldCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name="helloworld")
async def helloworld(self, ctx):
"""Responds with 'Hello World!'"""
await ctx.send("Hello World!")
async def setup(bot):
await bot.add_cog(HelloWorldCog(bot))