Hello, is anyone know why this DISCORD bot don’t working? It should be work like this:
Someone is creating new thread on DISCORD FORUM and this bot should text in his post like “Hello Thanks for open this thread” but he wasn’t.
anyone know why?
Well, I once tested that Python “gets” variable, function, class etc. names written in any other language that English very well Namely everything that is not required by Python grammar to be an English word (like, keywords) can use any characters that is considered a “word” characters.
Of course if one work with code that is read by an international team, then we use English language
Oh, and by the way: “coś tam” means “whatever”. I said to OP that there is no “whatever” decorator in the quoted function
Oh, I thought you meant that there was something specific in the API with that name, which is why I was surprised. For that to work, the developers would have to alias the name.
Jak to ustaliliśmy na tym forum, Chat GPT to raczej kiepski nauczyciel Raczej bym posiłkował się oficjalną dokumentacją tej biblioteki. Jak powiedziałem, nie robiłem nigdy bota do Discorda, ale ten kawałek kodu wydał mi się mocno podejrzany.
Hmm, możliwe więc, że bot żąda od serwera robienie czegoś czego mu nie przyzwolono.
Sprawdź w ustawieniach bota, czy bot ma uprawnienia do wysyłania wiadomości na wątkach.
Być może instrukcja intents=discord.Intents.all() próbuje pobrać za duże uprawnienia. Spróbuj może zamienić to na intents=discord.Intents(guilds=True).
To recap for others: in this Discord Thread Reply - #10 by FelixLeg post I recommended a new code to send a message to a newly made thread. Unfortunately, it still doesn’t send that message, which in the second post I wrote my doubts about if the bot was given the right set of permissions. But Kacper says it is still nothing.
If one can add something to the discussion, feel free to do so! I in the meantime am going to dig deeper in the Discord.py documentation
I’m still digging but for now a temporary idea: please, put in on_thread_create(...) a simple print like print("On thread create was executed") and check if that line is print on the console. If it is, then the problem lies in thread.send(...), if not then we have to check @bot.event.