Discord bot python Nachricht in Channel senden?

Gianluca08  12.03.2023, 08:47

Mit was codest du? Pycord? Discord.py?

Anton64bit 
Fragesteller
 12.03.2023, 22:50

Habe discord.py benutzt, schreibe is jetzt aber in js. Danke dir trotzdem!

1 Antwort

Mit google habe ich dazu folgendes gefunden:

To get a Channel ID right click the channel and click on "Copy ID" then paste it into your Discord or on a text editor.

Zum Punkt 2:


channel = client.get_channel(<chanelid>)
await channel.send('hello')

Dafür hat Discord.py doch extra das FAQ

https://discordpy.readthedocs.io/en/stable/faq.html#how-do-i-send-a-message-to-a-specific-channel

LG

Woher ich das weiß:Studium / Ausbildung – Informatik Student
Anton64bit 
Fragesteller
 12.03.2023, 22:50

Das konnte ich in diesem Fall nicht benutzten aber danke dir fürs bemühen

0
BPPtheo  12.03.2023, 22:51
@Anton64bit

Naja irgendwie muss es aber gehen , also ja wenn du mir mehr schickst wie dein Bott gerade aussieht also den Code, dann vltt

0