Skip to content

Conversation

@ThomasWu931
Copy link

Problem

Files provided in direct messages with the bot are not being stored within the mongo db client.

Solution

This issue is caused by these 2 chunks of code: one, and two. Since dms lack a message.guild field, an error will be raised in the 1st snippet because ur trying to access message.guild.id in the first snippet. This raises an error in the console and prevents dm files from being saved within the mongoDB client. However, this error isn't caught because the 2nd snippet ignores the error in try-except block.

Solution is to rewrite the ternary operator in snipper one.

Next Steps

NA

@ThomasWu931 ThomasWu931 changed the title removed try-catch + edited guild_id ternary operator Store DM files in mongo db Sep 2, 2022
@dhrumilp15 dhrumilp15 changed the title Store DM files in mongo db Store DM file metadata in mongo db Feb 13, 2023
@dhrumilp15
Copy link
Owner

This is a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants