Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dotsimus sends triggered keyword message to users even if they arent in the server #118

Open
MetkarAdi opened this issue Sep 7, 2021 · 7 comments
Labels
bug Something isn't working Hacktoberfest

Comments

@MetkarAdi
Copy link
Contributor

No description provided.

@itsWindows11
Copy link
Contributor

itsWindows11 commented Sep 7, 2021

What? Lemme investigate

EDIT: do you mean that upon leaving the server you have a watched keyword(s) in, it doesn't remove the keywords watched?

@itsWindows11
Copy link
Contributor

itsWindows11 commented Sep 7, 2021

Upon further inspection in index.js, I found some code that's related to that but idk, that makes me suspect that this issue is invalid:

          const guild = client.guilds.cache.get(server.id);
          if (!guild.members.cache.get(watchedKeywordsGuild.userId)) {
            db.removeWatchedKeyword(watchedKeywordsGuild.userId, server.id).then(resp => {
              refreshWatchedCollection()
              console.info('Removed watcher: ' + watchedKeywordsGuild.userId)
              return;
            })
          }

@MetkarAdi
Copy link
Contributor Author

I did have multiple users from another server complaining to me that "dot kept sending dms" even after they were banned.

@itsWindows11
Copy link
Contributor

I did have multiple users from another server complaining to me that "dot kept sending dms" even after they were banned.

Hmm then lemme look into it

@Jasius
Copy link
Member

Jasius commented Sep 12, 2021

It's kind of weird if this happens, as Dot checks whether user has access to a channel before sending a message, so if user isn't in the server then it cannot check for permissions and should auto remove them, will investigate this in the near future.

@UntrustedInstaller
Copy link

Agreed, shouldn't be doing that.

@Jasius Jasius added bug Something isn't working Hacktoberfest labels Sep 29, 2021
@itsWindows11
Copy link
Contributor

itsWindows11 commented Oct 1, 2021

Upon further inspection in index.js, I found some code that's related to that but idk, that makes me suspect that this issue is invalid:

          const guild = client.guilds.cache.get(server.id);
          if (!guild.members.cache.get(watchedKeywordsGuild.userId)) {
            db.removeWatchedKeyword(watchedKeywordsGuild.userId, server.id).then(resp => {
              refreshWatchedCollection()
              console.info('Removed watcher: ' + watchedKeywordsGuild.userId)
              return;
            })
          }

I think the issue might be it entirely depending on cache to get user/guild and check if user is in a guild, sometimes cache might be out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Hacktoberfest
Projects
None yet
Development

No branches or pull requests

4 participants