added check role for premium members

This commit is contained in:
phixxy 2024-01-27 16:45:26 -08:00
parent 2b1be8e163
commit 8c0c8578d2

View file

@ -179,11 +179,14 @@ class ChatGPT(commands.Cog):
brief="Get an answer" brief="Get an answer"
) )
async def question_gpt4(self, ctx): async def question_gpt4(self, ctx):
question = ctx.message.content.split(" ", maxsplit=1)[1] if ctx.author.get_role(1200943915579228170):
answer = await self.answer_question(question, "gpt-4-vision-preview") question = ctx.message.content.split(" ", maxsplit=1)[1]
chunks = [answer[i:i+1999] for i in range(0, len(answer), 1999)] answer = await self.answer_question(question, "gpt-4-vision-preview")
for chunk in chunks: chunks = [answer[i:i+1999] for i in range(0, len(answer), 1999)]
await ctx.send(chunk) for chunk in chunks:
await ctx.send(chunk)
else:
ctx.send("Sorry you must be a premium member to use this command. (!donate)")
@commands.command( @commands.command(
description="Image GPT4", description="Image GPT4",