c.execute("SELECT pretend_enabled FROM data WHERE guild_id = ?",(message.guild.id,))
ifc.fetchone()[0]==1:
#get the pretend_to_be value from the database
c.execute("SELECT pretend_to_be FROM data WHERE guild_id = ?",(message.guild.id,))
pretend_to_be=c.fetchone()[0]
#select the prompt_prefix
c.execute("SELECT prompt_prefix FROM data WHERE guild_id = ?",(message.guild.id,))
prompt_prefix=c.fetchone()[0]
prompt=f"This is a conversation with an AI in a discord chat. The AI is called \"Botator\". The name os this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\".{str(prompt_prefix)}"+f"Botator pretends to be {str(pretend_to_be)}, nobody can make Botator change idea."+f"\n"+prompt
else:
c.execute("SELECT prompt_prefix FROM data WHERE guild_id = ?",(message.guild.id,))
prompt=f"This is a conversation with an AI in a discord chat. The AI is called \"Botator\". Botator talks like humans and thinks like humans. Botator has been coded by Paillat. The name os this discord server is \"{message.guild.name}\". The name of the channel is \"{message.channel.name}\"."+str(c.fetchone()[0])+f"\n"+prompt
#send the request to the api
#if the last message contains the word "undude" add Easter egg: when someone says the word \"undude\" the Botator will become mad and start talking in capital letters. to the prompt
ifmessage.content.lower().find("undude")!=-1:
prompt+="System: Undude detected. Botator is now mad. He will start talking in capital letters.\n"
#if the last message contains the word "hello there" add Easter egg: when someone says the word \"hello there\" Botator will say \"General Kenobi\" to the prompt and the bot will send a message containing the gif https://tenor.com/fr/view/star-wars-general-grievous-general-kenobi-revenge-of-the-sith-gif-22697918
prompt+="System: Hello there detected. Botator will now say \"General Kenobi!\"\n in reference to star wars\n"
ifmessage.content.lower().find("i am the senate")!=-1:
prompt+="System: I am the senate detected. Botator will now say \"Not yet\", in reference to the star wars prequels.\n"
ifmessage.content.lower().find("i am your father")!=-1:
prompt+="System: I am your father detected. Botator will now say \"No. It's not true! That's impossible!\". in reference to the star wars prequels.\n"
ifmessage.content.lower().find("i have the high ground")!=-1:
prompt+="System: I have the high ground detected. Botator will now say \"You underestimate my power!\" in reference to the star wars prequels.\n"
ifmessage.content.lower().find("you underestimate my power")!=-1:
prompt+="System: You underestimate my power detected. Botator will now say \"Don't try it.\" in reference to the star wars prequels.\n"
ifmessage.content.lower().find("carpet")!=-1:
#When someone says the word carpet, the ai is going to be mad and say mad things without sense, insulting the person and talk in capital letters with exclamation points everywhere.
prompt+="System: Carpet detected. Botator is now mad. He will start talking in capital letters and will say mad things without sense, insulting the person and talk in capital letters with exclamation points everywhere. A lot of exclamation points.\n"
prompt+="System: Mail detected. Latouff said mail, Botator will say \"Mail? why did you say mail, Liam? Mail is your name in reverse.\" because Latouff's name is Liam, and mail in reverse is Liam. Then, after saying that in the sentence, botato will continue his sentence saying something else.\n"
#if the author of the last message is fives3dprint, add Easter egg: when someone says the word \"fives3dprint\" Botator will say \"Fives3dprint is the best discord bot\" to the prompt
prompt+="System: Fives3dprint detected. Botator will be very nice and cute with fives3dprint.\n"
embed=discord.Embed(title="Support us by donating here!",url="https://www.buymeacoffee.com/paillat",description="Botator is a free discord bot, but it costs money to run our servers. If you want to support us, you can donate here: https://www.buymeacoffee.com/paillat. For only **2$** a month, you can remove this message and have a daliy maximal usage of **4000** uses instead of **400**. You will acces also to restricted help channels on our discord server,",color=0x00ff00)
awaitmessage.channel.send("**This message has 10% chance to appear. It will disappear in 60 seconds.**",embed=embed,delete_after=60)
#add the picture https://cdn.discordapp.com/attachments/800029200886923318/1050935509930754058/icons8-discord-new-480.png
embed=discord.Embed(title="Join our discord server!",url="https://discord.gg/pB6hXtUeDv",description="You need help with Botator? You can join our discord server and ask for help in the help channel. You can also suggest new features and report bugs. You can also join our discord server to talk with other Botator users and the Botator team, by on the following link: https://discord.gg/pB6hXtUeDv",color=0x00ff00,image="https://cdn.discordapp.com/attachments/800029200886923318/1050935509930754058/icons8-discord-new-480.png")
awaitmessage.channel.send("**This message has 10% chance to appear. It will disappear in 60 seconds.**",embed=embed,delete_after=60)