Die Suche ergab 2 Treffer

von Juestan
Montag 22. November 2021, 23:40
Forum: Allgemeine Fragen
Thema: Discord py
Antworten: 2
Zugriffe: 600

Re: Discord py

Die Instanz heißt bei mir in der tat commands.

Hier einmal der ganze code:
import discord
from discord.ext import commands
import youtube_dl

class music(commands.Cog):
def __init__(self,client):
self.client = client

@commands.command()
async def join(self,ctx):
if ctx.author.voice is None ...
von Juestan
Freitag 19. November 2021, 19:13
Forum: Allgemeine Fragen
Thema: Discord py
Antworten: 2
Zugriffe: 600

Discord py

Hi, ich habe einen Discord Bot der mit einem Befehl eine Nachricht in den Chat sendet indem der Befehl ausgeführt wurde.

Ich habe bereits einen code, der nicht funktioniert:
@commands.command()
async def hilfe(ctx):
await ctx.send('hi')

Mein prefix ist "-"
also soll er mit dem command "-hilfe ...