This commit is contained in:
Paillat
2022-11-27 20:34:01 +01:00
parent b159a867cb
commit 062ecd8121

View File

@@ -5,6 +5,7 @@ import logging # pip install logging
import sqlite3 # pip install sqlite3 import sqlite3 # pip install sqlite3
import asyncio # pip install asyncio import asyncio # pip install asyncio
import os # pip install os import os # pip install os
#set the debug mode to the maximum #set the debug mode to the maximum
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
@@ -42,7 +43,7 @@ async def setup(ctx, channel: discord.TextChannel, api_key):
await ctx.respond("This server is already setup", ephemeral=True) await ctx.respond("This server is already setup", ephemeral=True)
return return
#add the guild to the database #add the guild to the database
c.execute("INSERT INTO data VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (ctx.guild.id, channel.id, api_key, False, 50, 0.9, 0.0, 0.0, 0, 0)) c.execute("INSERT INTO data VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", (ctx.guild.id, channel.id, api_key, False, 150, 1, 0, 0.6, 0, 5))
conn.commit() conn.commit()
await ctx.respond("Setup complete", ephemeral=True) await ctx.respond("Setup complete", ephemeral=True)
#create a command called "enable" taht only admins can use #create a command called "enable" taht only admins can use
@@ -76,7 +77,7 @@ async def disable(ctx):
##@discord.commands.permissions(administrator=True) ##@discord.commands.permissions(administrator=True)
#set the first argument: max_tokens, with a default value of 150 #set the first argument: max_tokens, with a default value of 150
@discord.commands.option(name="max_tokens", description="The max tokens", required=False) @discord.commands.option(name="max_tokens", description="The max tokens", required=False)
#set the second argument: temperature, with a default value of 0.5 #set the second argument: temperature, with a default value of 1
@discord.commands.option(name="temperature", description="The temperature", required=False) @discord.commands.option(name="temperature", description="The temperature", required=False)
#set the third argument: frequency_penalty, with a default value of 0.5 #set the third argument: frequency_penalty, with a default value of 0.5
@discord.commands.option(name="frequency_penalty", description="The frequency penalty", required=False) @discord.commands.option(name="frequency_penalty", description="The frequency penalty", required=False)