From 4d4c3b0ff8d7cf5d6a8f2abf1901337204c0534d Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Fri, 6 Aug 2021 20:35:05 -0600 Subject: [PATCH] secrets -> random --- jarvis/cogs/jokes.py | 4 ++-- jarvis/cogs/verify.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jarvis/cogs/jokes.py b/jarvis/cogs/jokes.py index b1be215..af3cb92 100644 --- a/jarvis/cogs/jokes.py +++ b/jarvis/cogs/jokes.py @@ -3,7 +3,7 @@ import html import re import traceback from datetime import datetime -from secrets import randint +from random import randint from discord.ext import commands from discord_slash import cog_ext @@ -33,7 +33,7 @@ class JokeCog(commands.Cog): async def _joke(self, ctx: SlashContext, id: str = None) -> None: """Get a joke from the database.""" try: - if randint(1, 100_000) == 5779 and id is None: + if randint(1, 100_000) == 5779 and id is None: # noqa: S311 await ctx.send(f"<@{ctx.message.author.id}>") return # TODO: Add this as a parameter that can be passed in diff --git a/jarvis/cogs/verify.py b/jarvis/cogs/verify.py index f3f02f5..54ea278 100644 --- a/jarvis/cogs/verify.py +++ b/jarvis/cogs/verify.py @@ -1,5 +1,5 @@ """J.A.R.V.I.S. Verify Cog.""" -from secrets import randint +from random import randint from discord.ext import commands from discord_slash import cog_ext @@ -14,7 +14,7 @@ from jarvis.db.models import Setting def create_layout() -> list: """Create verify component layout.""" buttons = [] - yes = randint(0, 2) + yes = randint(0, 2) # noqa: S311 for i in range(3): label = "YES" if i == yes else "NO" id = f"no_{i}" if not i == yes else "yes"