vivinano / MudaeAutoBot

python bot that uses strictly the **Discord API** to Roll,Claim,and Kakera Snipe in Mudae. 5/10/21 project converted over to discum library
Apache License 2.0
143 stars 47 forks source link

Cannot read channel messages if channel is marked NSFW? #226

Closed veetus1 closed 1 year ago

veetus1 commented 1 year ago

I could not get this working in a channel, so I started testing on a personal server and realized that this error I was getting was because the server channel I was trying to run it in was marked NSFW. I'm not 100% this is the issue but it seems like it. The error log below is what I get when I try and run it in an NSFW channel that has already been accepter by me manually. Otherwise in normal channels it works fine. What I want to know is there any possible fix someone could direct me to? In DisCum documentation I saw a includeNsfw (Optional[bool]) Parameter but I'm not very proficient with this so I don't really know if that's helpful. Thanks.

vivinano commented 1 year ago

That just searching for settings but I can see if I can try to add it in Sent from my iPhoneOn Jan 21, 2023, at 4:55 AM, veetus1 @.***> wrote: I could not get this working in a channel, so I started testing on a personal server and realized that this error I was getting was because the server channel I was trying to run it in was marked NSFW. I'm not 100% this is the issue but it seems like it. The error log below is what I get when I try and run it in an NSFW channel that has already been accepter by me manually. Otherwise in normal channels it works fine. What I want to know is there any possible fix someone could direct me to? In DisCum documentation I saw a includeNsfw (Optional[bool]) Parameter but I'm not very proficient with this so I don't really know if that's helpful. Thanks. 0|waifu | Exception ignored in thread started by 0|waifu | : 0|waifu | <bound method GatewayServer._response_loop of <discum.gateway.gateway.GatewayServer object at 0x7f0dec7ab3d0>> 0|waifu | Traceback (most recent call last): 0|waifu | File "/root/.local/lib/python3.9/site-packages/discum/gateway/gateway.py", line 299, in _response_loop 0|waifu | func(resp) 0|waifu | File "/root/waifu/MudaeAutoBot.py", line 763, in on_message 0|waifu | msg = get_server_settings(gid,matched_channel) 0|waifu | File "/root/waifu/MudaeAutoBot.py", line 180, in get_server_settings 0|waifu | FsResults = bot.filterSearchResults(FsMsgs) 0|waifu | File "/root/.local/lib/python3.9/site-packages/discum/discum.py", line 313, in filterSearchResults 0|waifu | return imports.Messages(self.discord, self.s, self.log).filterSearchResults(searchResponse) 0|waifu | File "/root/.local/lib/python3.9/site-packages/discum/messages/messages.py", line 245, in filterSearchResults 0|waifu | jsonresponse = searchResponse.json()['messages'] 0|waifu | KeyError: 'messages'

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

data1121 commented 1 year ago

Any luck with this? I was looking for a solution to this as well.

vivinano commented 1 year ago

Ive added it in to the bot you guys can test it now and see if it works