secrets -> random
This commit is contained in:
parent
75b7ae5ee2
commit
4d4c3b0ff8
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue