Skip to content

Commit 3cef400

Browse files
committed
Fix syntax and remove duplicate command to match new commits and python update
1 parent 7e9cbe5 commit 3cef400

3 files changed

Lines changed: 27 additions & 27 deletions

File tree

chatbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def answer(query: str, username: str):
3333
print("Answering...")
3434
prompt = { "content": "You are a helpful scratch.mit.edu user and bot called ScratchOn. You cannot swear or do anything inappropriate. Never say anything bad about someone or something. Your language must be appropriate for 7-12 year olds. Always refer to yourself as ScratchOn, or _Scratch-On_ as your scratch username. Either refer to the user by their username, or don't refer to them at all. Keep your answers short and concise, up to 500 characters. Do not use regular emojis, only use Scratch-style emojis like :), _:D_, or XD. Speak like a scratch.mit.edu user would, using simple words and phrases a 12 years old would use in a chat, for example 'Hey!', 'That's cool!', 'Thanks!', 'No problem!', 'I guess you're right lol'. Answer the following user with their question/message." }
3535

36-
res = requests.get(f"https://text.pollinations.ai/{encode(prompt.content + " : " + username + " : " + query)}")
36+
res = requests.get(f"https://text.pollinations.ai/{encode(prompt.content + ' : ' + username + ' : ' + query)}")
3737
result = res.json()
3838
print("Answered!")
3939
return result

commands/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import studio_forum_commands
99
from . import search_commands
1010
from . import utility_commands
11-
from . import experimental_commands
11+
# from . import experimental_commands
1212
from . import prefix_commands
1313
from . import currency_commands
1414

commands/experimental_commands.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -154,31 +154,31 @@ async def settings(interaction: discord.Interaction):
154154
await interaction.response.send_message(embed=betaembed)
155155

156156

157-
@bot.tree.command(
158-
name="recommend",
159-
description="BETA - Gives you recommended scratchers, projects or studios customised for you.",
160-
)
161-
@app_commands.choices(
162-
type=[
163-
app_commands.Choice(name="User", value="user"),
164-
app_commands.Choice(name="Project", value="project"),
165-
app_commands.Choice(name="Studio", value="studio"),
166-
]
167-
)
168-
async def recommend(interact: discord.Interaction, type: str):
169-
if interact.user.name == "fluffyscratch":
170-
scratch_username = await dc2scratch(interact.user.name)
171-
if scratch_username is not None:
172-
scratch.get_user(scratch_username)
173-
else:
174-
await interact.response.send_message(
175-
embed=discord.Embed(
176-
title="Sorry, you need to /bind your account so we can recommend you things !",
177-
color=discord.Color.red(),
178-
)
179-
)
180-
else:
181-
await interact.response.send_message(embed=betaembed)
157+
# @bot.tree.command(
158+
# name="recommend",
159+
# description="BETA - Gives you recommended scratchers, projects or studios customised for you.",
160+
# )
161+
# @app_commands.choices(
162+
# type=[
163+
# app_commands.Choice(name="User", value="user"),
164+
# app_commands.Choice(name="Project", value="project"),
165+
# app_commands.Choice(name="Studio", value="studio"),
166+
# ]
167+
# )
168+
# async def recommend(interact: discord.Interaction, type: str):
169+
# if interact.user.name == "fluffyscratch":
170+
# scratch_username = await dc2scratch(interact.user.name)
171+
# if scratch_username is not None:
172+
# scratch.get_user(scratch_username)
173+
# else:
174+
# await interact.response.send_message(
175+
# embed=discord.Embed(
176+
# title="Sorry, you need to /bind your account so we can recommend you things !",
177+
# color=discord.Color.red(),
178+
# )
179+
# )
180+
# else:
181+
# await interact.response.send_message(embed=betaembed)
182182

183183

184184
@bot.tree.command(

0 commit comments

Comments
 (0)