SinisterRectus / Discordia

Discord API library written in Lua for the Luvit runtime environment
MIT License
688 stars 144 forks source link

bulkDelete is starting to break apart #390

Closed hmm-what25 closed 1 year ago

hmm-what25 commented 1 year ago

So there's a problem where bulkDelete doesn't work sometimes it does, sometimes doesn't

This is the error: image

before it worked just fine but now it's breaking apart. I have no idea what's causing it, but it's maybe a Discord update that broke it.

Idkkitty commented 1 year ago

i think they broke it with their new update

hmm-what25 commented 1 year ago

Heres more info: The channel i'm trying to call bulkDelete on is a guild channel

and this is the source code image

Lort533 commented 1 year ago

https://github.com/SinisterRectus/Discordia/wiki/GuildTextChannel#bulkdeletemessages

Messages over 2 weeks old cannot be deleted and will return an error.

If you still think this error is not related to the above statement, you may be able to check the error reason by adding another variable to read the error. Try:

local messages = -- (...)
local response, err = channel:bulkDelete(messages)
p(response, err)
hmm-what25 commented 1 year ago

I can't even delete the latest messages if there are messages over 2 weeks in the channel

hmm-what25 commented 1 year ago

Okay, so i added it The bug was fixed it was maybe a problem in discord's api which they fixed shortly after my post