Skip to content

Commit 9168fc1

Browse files
authored
Merge pull request #238 from practical-python-org/fix/Owner-to-sudo
fix: Changed role from "Owner" to "Sudo"
2 parents be98514 + 0ee8eff commit 9168fc1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/zorak/cogs/utility/points.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ async def on_message_delete(self, message: discord.Message):
4545
#
4646
# # TODO: Fix the backup command.
4747
# # @commands.slash_command()
48-
# # @commands.has_any_role("Staff", "Owner", "Project Manager")
48+
# # @commands.has_any_role("Staff", "Sudo", "Project Manager")
4949
# # async def backup_db(self, ctx):
5050
# # """Backup the MongoDB instance."""
5151
# # self.bot.db_client.backup_db()
5252
# # await ctx.respond("Database backed up.")
5353

5454
@commands.slash_command()
55-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
55+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
5656
async def add_all_members_to_db(self, ctx):
5757
"""Add all members to the database."""
5858
self.bot.db_client.create_table_from_members(ctx.guild.members)
5959
await ctx.respond("All members added to database.")
6060

6161
@commands.slash_command()
62-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
62+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
6363
async def add_points_to_user(self, ctx, mention, points):
6464
"""Add points to a user."""
6565
user = self.bot.get_user(int(mention.split("@")[1].split(">")[0]))
@@ -69,7 +69,7 @@ async def add_points_to_user(self, ctx, mention, points):
6969
await ctx.respond(f"{points} point{('s', '')[abs(int(points)) == 1]} added to {mention}.")
7070

7171
@commands.slash_command()
72-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
72+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
7373
async def add_points_to_all_users(self, ctx, points):
7474
"""Add points to all users."""
7575
self.bot.db_client.add_points_to_all_users(int(points))
@@ -78,7 +78,7 @@ async def add_points_to_all_users(self, ctx, points):
7878
await ctx.respond(f"{points} point{('s', '')[abs(int(points)) == 1]} added to all users.")
7979

8080
@commands.slash_command()
81-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
81+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
8282
async def remove_points_from_user(self, ctx, mention, points):
8383
"""Remove points from a user."""
8484
mention = str(mention)
@@ -90,7 +90,7 @@ async def remove_points_from_user(self, ctx, mention, points):
9090
await ctx.respond(f"{points} point{('s', '')[abs(points) == 1]} removed from {mention}.")
9191

9292
@commands.slash_command()
93-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
93+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
9494
async def remove_points_from_all_users(self, ctx, points):
9595
"""Remove points from all users."""
9696
points = int(points)
@@ -100,7 +100,7 @@ async def remove_points_from_all_users(self, ctx, points):
100100
await ctx.respond(f"{points} point{('s', '')[abs(points) == 1]} removed from all users.")
101101

102102
@commands.slash_command()
103-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
103+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
104104
async def reset_points_for_user(self, ctx, mention):
105105
"""Reset points for a user."""
106106
mention = str(mention)
@@ -111,7 +111,7 @@ async def reset_points_for_user(self, ctx, mention):
111111
await ctx.respond(f"Points reset for {mention}.")
112112

113113
@commands.slash_command()
114-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
114+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
115115
async def reset_points_for_all_users(self, ctx):
116116
"""Reset points for all users."""
117117
self.bot.db_client.set_all_user_points(0)
@@ -120,7 +120,7 @@ async def reset_points_for_all_users(self, ctx):
120120
await ctx.respond("Points reset for all users.")
121121

122122
@commands.slash_command()
123-
@commands.has_any_role("Admin", "Owner", "Staff", "Project Manager")
123+
@commands.has_any_role("Admin", "Sudo", "Staff", "Project Manager")
124124
async def get_points_for_user(self, ctx, mention):
125125
"""Get points for a user."""
126126
mention = str(mention)

0 commit comments

Comments
 (0)