Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -141,14 +141,39 @@ async def presence():
|
|
141 |
async def on_disconnect():
|
142 |
print("Disconnected, Clone status:", clone)
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
@client.event
|
145 |
async def on_message(message):
|
146 |
if message.content == "--help":
|
147 |
def check(reaction, user):
|
148 |
return reaction.message.id == msg.id and user == message.author
|
149 |
page = 0
|
150 |
-
titles = ["
|
151 |
-
pages = [
|
152 |
embed = discord.Embed(title=titles[page], description=pages[page])
|
153 |
msg = await message.reply(embed=embed)
|
154 |
await msg.add_reaction("◀️")
|
@@ -162,7 +187,8 @@ async def on_message(message):
|
|
162 |
await msg.edit(embed=embed)
|
163 |
if reaction.emoji == '▶️' and page < len(pages) -1:
|
164 |
page += 1
|
165 |
-
embed = discord.Embed(title=titles[page], description=pages[page]
|
|
|
166 |
await msg.edit(embed=embed)
|
167 |
except asyncio.TimeoutError:
|
168 |
await msg.delete()
|
|
|
141 |
async def on_disconnect():
|
142 |
print("Disconnected, Clone status:", clone)
|
143 |
|
144 |
+
setupCommand = """
|
145 |
+
## Command: --setup
|
146 |
+
|
147 |
+
The --setup command enables Lyre to communicate within a designated channel.
|
148 |
+
|
149 |
+
## Usage:
|
150 |
+
```css
|
151 |
+
--setup [channel]
|
152 |
+
```
|
153 |
+
|
154 |
+
## Parameters
|
155 |
+
- **[channel]**: Specify the target channel where you want the bot to be active. This can be either the channel name or ID.
|
156 |
+
|
157 |
+
## Example
|
158 |
+
```arduino
|
159 |
+
--setup #general
|
160 |
+
```
|
161 |
+
|
162 |
+
or
|
163 |
+
|
164 |
+
```arduino
|
165 |
+
--setup <#123456789>
|
166 |
+
```
|
167 |
+
"""
|
168 |
+
|
169 |
@client.event
|
170 |
async def on_message(message):
|
171 |
if message.content == "--help":
|
172 |
def check(reaction, user):
|
173 |
return reaction.message.id == msg.id and user == message.author
|
174 |
page = 0
|
175 |
+
titles = ["""--setup""", """--reset"""]
|
176 |
+
pages = [setupCommand, "hi2"]
|
177 |
embed = discord.Embed(title=titles[page], description=pages[page])
|
178 |
msg = await message.reply(embed=embed)
|
179 |
await msg.add_reaction("◀️")
|
|
|
187 |
await msg.edit(embed=embed)
|
188 |
if reaction.emoji == '▶️' and page < len(pages) -1:
|
189 |
page += 1
|
190 |
+
embed = discord.Embed(title=titles[page], description=pages[page])
|
191 |
+
embed.set_footer(f"Page {page + 1} of {len(pages)}")
|
192 |
await msg.edit(embed=embed)
|
193 |
except asyncio.TimeoutError:
|
194 |
await msg.delete()
|