Bot Discord

I have a discord bot that I’ve all put in administrator but he can’t find permission for that
23 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
invisibility
invisibilityOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
invisibility
invisibilityOP3y ago
It doesn’t light up at all I have direct error
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
HimmDawg
HimmDawg3y ago
Ok, so first of all, async/await Second, this ^
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
invisibility
invisibilityOP3y ago
??
HimmDawg
HimmDawg3y ago
You have a lot of methods like GetChannelASYNC or SendMessageASYNC. Async methods usually have to be awaited. Everything else can probably lead to a deadlock for example, take this line here
var a = Client.GetChannelAsync(IDCHANNEL).GetAwaiter().GetResult();
var a = Client.GetChannelAsync(IDCHANNEL).GetAwaiter().GetResult();
With async/await, you'll have
var a = await Client.GetChannelAsync(IDCHANNEL);
var a = await Client.GetChannelAsync(IDCHANNEL);
(given that the method you are using this in is also async) Alsooooo, what exactly is IDCHANNEL. iirc, this function of D#+ needs a ulong
invisibility
invisibilityOP3y ago
Ok Even if I remove the error the bot doesn’t turn on
invisibility
invisibilityOP3y ago
invisibility
invisibilityOP3y ago
HimmDawg
HimmDawg3y ago
how did you configure your client?
invisibility
invisibilityOP3y ago
HimmDawg
HimmDawg3y ago
I hope this is not your real token 😄 If yes, you should change it now. Anyway, i think a discord bot needs intents to work properly. Not sure how the lib handles that
Thinker
Thinker3y ago
Iirc in your DiscordConfiguration you need to specify the intents
invisibility
invisibilityOP3y ago
No real token xd
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
HimmDawg
HimmDawg3y ago
Well from discord.js i know that the bot straight up wont even start without intents adding Intents = DiscordIntent.AllUnprivileged to the discord configuration should do the trick
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
invisibility
invisibilityOP3y ago
We also talked about the .env file
RTXPower
RTXPower3y ago
It's because you see it surpass you too many times sadly
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server