Making things optional arguments

pull/8/head
sgoudham 4 years ago
parent 4610a3bc64
commit aba109547c

@ -4,6 +4,7 @@ import random
import string import string
import textwrap import textwrap
import urllib.parse import urllib.parse
from typing import Optional
import discord import discord
from PIL import Image, ImageDraw, ImageFont from PIL import Image, ImageDraw, ImageFont
@ -213,7 +214,7 @@ class Fun(commands.Cog):
@command(name="doggo", aliases=["Doggo"]) @command(name="doggo", aliases=["Doggo"])
@bot_has_permissions(embed_links=True) @bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def doggo(self, ctx, breed=None): async def doggo(self, ctx, breed: Optional[str] = None):
"""Pictures of Doggos!""" """Pictures of Doggos!"""
# Set member as the author # Set member as the author
@ -370,7 +371,7 @@ class Fun(commands.Cog):
await ctx.message.channel.send(owo) await ctx.message.channel.send(owo)
@command(name="remindme", aliases=["Remindme", "rm"]) @command(name="remindme", aliases=["Remindme", "rm"])
async def remind_me(self, ctx, time=None, *, text): async def remind_me(self, ctx, time: Optional[int] = None, *, text):
"""Remind you in DMs""" """Remind you in DMs"""
# Grab the author and store it in "author" # Grab the author and store it in "author"

Loading…
Cancel
Save