You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.
Everyone, but those who have access to the db warns table, have no way of seeing who they have warned without remembering it or writing it down themselves. I've started developing a method to accomplish this task and will make a pull request when finished but thought I should share the idea asap. The plan is for a Menu Embed like the help menu which will display the usual embed upon using the warn list (user) command, furthermore, it will be one page per warned user. Also, the command, as of right now, is >>warns listall. If you have any thoughts on a different name for it please lmk.
Question: Should the permissions to use this command be only for those who can make warns or @everyone? I personally feel that normal users should not have the ability to see the warns of another user -- they should only be able to view their own warning list.
The text was updated successfully, but these errors were encountered:
This is the logic behind the cmd, everything else is formatting. Going to wait to do formatting until the warn points system gets updated and code is accessible.
To sum it up, you search through the db for all userIDs with the current guild then insert that list into a key dictionary to remove duplicates. Then you take that dictionary and revert it back into a list. The list has "(" at the beginning and ",)" at the end of each userID so they are "removed" at each iteration, [1:19]. A user object is created from this id which can be used for everything else, getting the warns for that user, user's display name, colour, etc.
warned_users = await self.bot.db.records(
"SELECT UserID FROM warns WHERE GuildID = ?", ctx.guild.id
)
warned_users = list(dict.fromkeys(warned_users))
for user_id in warned_users:
user = self.bot.get_user(int(str(user_id)[1:19]))```
Everyone, but those who have access to the db warns table, have no way of seeing who they have warned without remembering it or writing it down themselves. I've started developing a method to accomplish this task and will make a pull request when finished but thought I should share the idea asap. The plan is for a Menu Embed like the help menu which will display the usual embed upon using the warn list (user) command, furthermore, it will be one page per warned user. Also, the command, as of right now, is >>warns listall. If you have any thoughts on a different name for it please lmk.
Question: Should the permissions to use this command be only for those who can make warns or @everyone? I personally feel that normal users should not have the ability to see the warns of another user -- they should only be able to view their own warning list.
The text was updated successfully, but these errors were encountered: