From 7f63fa0bfb7104bc6a5dc6e1ee164d72ed66d233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Fri, 23 Apr 2021 21:27:04 +0200 Subject: [PATCH] Declare option_type by method instead of int --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 60f5c85..5c5f24c 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ import os import dateparser import discord +from discord_slash.model import SlashCommandOptionType import pytz from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.schedulers.asyncio import AsyncIOScheduler @@ -97,13 +98,13 @@ async def do_reminders(ctx): create_option( name="message_reason", description="The message I should send when I notify you.", - option_type=3, # String + option_type=SlashCommandOptionType.STRING, required=True, ), create_option( name="message_date", description="The time or date I should write in this channel.", - option_type=3, # String + option_type=SlashCommandOptionType.STRING, required=True, ), ],