-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
519 lines (454 loc) · 26.7 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
import discord
from discord import app_commands
import json
import random
import d20
import requests
from io import BytesIO
from os import path
from subprocess import run, PIPE
import magic
myColor = discord.Color.from_rgb(r=255, g=0, b=255)
intents = discord.Intents.default()
client = discord.Client(intents=intents)
tree = app_commands.CommandTree(client)
with open('secrets.json', 'r') as file:
secrets = json.load(file)
headmatesList = ["aspyn", "Cassie", "Shane", "Ruth", "nea", "Pearl"]
class Anime():
def __init__(self):
self.animeInfo = self.getAnimeList()
def getAnimeList(self):
response = requests.get("https://api.myanimelist.net/v2/users/aspynect/animelist?status=completed&sort=list_score&limit=25&fields=id,title,mean,main_picture,list_status,alternative_titles", headers = {'X-MAL-CLIENT-ID': secrets["mal-token"]})
response.raise_for_status()
anime_list = response.json()
response.close()
animeList = anime_list['data']
optionsList = []
for index in range(len(animeList)):
anime = animeList[index]["node"]
optionsList.append(discord.SelectOption(label = anime['title'], value = index, description = anime['alternative_titles']['en']))
return [animeList, optionsList]
def embed(self, anime):
animeNode = anime["node"]
embed = discord.Embed(title = animeNode["title"], description = animeNode["alternative_titles"]["en"], color = myColor, url = f"https://myanimelist.net/anime/{animeNode['id']}")
embed.add_field(name = "Mean Rating", value = animeNode["mean"])
embed.add_field(name = "My Rating", value = anime["list_status"]["score"])
embed.set_image(url = animeNode["main_picture"]["large"])
return embed
def embedTwo(self, index):
anime = self.getAnime(index)
return self.embed(anime)
def getAnime(self, index):
anime = self.animeInfo[0][int(index)]
return anime
async def sus(id):
if id not in [439441145466978305, 99801098088370176]:
return True
return False
async def vote(interaction: discord.Interaction):
embed = discord.Embed(title = "impostor >:(", color = discord.Color.red())
embed.set_image(url="attachment://sus.webp")
await interaction.response.send_message(embed = embed, ephemeral = True, file = discord.File('assets/sus.webp'))
await snitch(interaction)
async def snitch(interaction: discord.Interaction):
aspynUser = await client.fetch_user(439441145466978305)
embed = discord.Embed(title = "Impostor Alert", color = myColor)
embed.add_field(name = "Name", value = interaction.user.display_name)
embed.add_field(name = "user", value = interaction.user.name)
embed.add_field(name = "Command", value = interaction.command.name)
embed.add_field(name = "ID", value = interaction.user.id)
embed.add_field(name = "Mention", value = f"<@{interaction.user.id}>")
embed.set_image(url = interaction.user.avatar.url)
await aspynUser.send(embed = embed)
#TODO currency conversions (ephemeral)
#TODO doesthedogdie?
animeThings = Anime()
class AnimeSelector(discord.ui.View):
def __init__(self):
super().__init__()
@discord.ui.select(placeholder = "Select an anime", options = animeThings.animeInfo[1], max_values=1)
async def animeSelector(self, interaction: discord.Interaction, select: discord.ui.Select):
anime = select.values[0]
embed = animeThings.embedTwo(anime)
await interaction.response.edit_message(embed = embed)
class CounterButton(discord.ui.View):
def __init__(self):
super().__init__()
self.counter = 0
@discord.ui.button(label = "- 1")
async def subButton(self, interaction: discord.Interaction, button:discord.ui.Button):
self.counter -= 1
await interaction.response.edit_message(content = self.counter)
@discord.ui.button(label = "+ 1")
async def addButton(self, interaction: discord.Interaction, button:discord.ui.Button):
self.counter += 1
await interaction.response.edit_message(content = self.counter)
class SystemViews(discord.ui.View):
def __init__(self):
super().__init__()
self.imageIndex = 0
with open('system.json', 'r') as file:
self.infoDict = json.load(file)
self.currentMember = ""
async def buildAndSend(self, interaction: discord.Interaction):
member = self.infoDict[self.currentMember]
embed = discord.Embed(color = myColor, title = f"{self.currentMember} • {member["pronouns"]}")
embed.description = member["bio"]
embed.set_image(url = "attachment://image.webp")
embed.set_footer(text = f"Image {self.imageIndex + 1}/{len(member["images"])}")
await interaction.response.edit_message(embed = embed, attachments = [discord.File(member["images"][self.imageIndex], filename = "image.webp")])
@discord.ui.select(placeholder = "Select a headmate", options = [discord.SelectOption(label = headmatesList[i], value = i) for i in range(len(headmatesList))], max_values=1)
async def headmateSelector(self, interaction: discord.Interaction, select: discord.ui.Select):
self.imageIndex = 0
self.currentMember = headmatesList[int(select.values[0])]
await self.buildAndSend(interaction)
@discord.ui.button(label = "←")
async def prevButton(self, interaction: discord.Interaction, button:discord.ui.Button):
if not self.currentMember:
await interaction.response.send_message("Please select a headmate first.", ephemeral = True)
return
memberImages = self.infoDict[self.currentMember]["images"]
self.imageIndex = (self.imageIndex - 1) % len(memberImages)
await self.buildAndSend(interaction)
@discord.ui.button(label = "→")
async def addButton(self, interaction: discord.Interaction, button:discord.ui.Button):
if not self.currentMember:
await interaction.response.send_message("Please select a headmate first.", ephemeral = True)
return
memberImages = self.infoDict[self.currentMember]["images"]
self.imageIndex = (self.imageIndex + 1) % len(memberImages)
await self.buildAndSend(interaction)
#TODO Check SRC queues - length, date of oldest run?
@tree.command(name="ping",description="ping")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def ping(interaction: discord.Interaction):
await interaction.response.send_message("h", ephemeral =True)
@tree.command(name="counter",description="counter")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def counter(interaction: discord.Interaction, visible: bool = False):
await interaction.response.send_message("0", ephemeral = not visible, view = CounterButton())
@tree.command(name="anime",description="My Anime List")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def anime(interaction: discord.Interaction, visible: bool = False):
embed = discord.Embed(title = "Shigatsu wa Kimi no Uso", description = "Your Lie in April", color = myColor, url = "https://myanimelist.net/anime/23273")
embed.add_field(name = "Mean Rating", value = "8.64")
embed.add_field(name = "My Rating", value = "10")
embed.set_image(url = "https://cdn.myanimelist.net/images/anime/1405/143284l.webp")
await interaction.response.send_message(embed = embed, ephemeral = not visible, view = AnimeSelector())
@tree.command(name="system",description="My System!")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def system(interaction: discord.Interaction, visible: bool = False):
embed = discord.Embed(title = "Pearlescence System", description = "Welcome to my system index! Use the dropdown below to select a headmate, and the buttons to flip through their images!\nQuestions are more than welcome, please don't be scared to ask!\nNote: Messages by any member other than aspyn will be proxy tagged with the first letter of their name.", color = myColor)
embed.add_field(name = "Resources", value = "[More Than One](<https://morethanone.info/>)\n[Pluralpedia](<https://pluralpedia.org/w/Plurality>)")
await interaction.response.send_message(embed = embed, view = SystemViews(), ephemeral = not visible)
@tree.command(name="sync",description="sync")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def sync(interaction: discord.Interaction):
if await sus(interaction.user.id):
await vote(interaction)
return
await tree.sync()
await interaction.response.send_message("sunk!", ephemeral = True)
print("Sunk!")
@tree.command(name="pronouns",description="Pronouns... woke")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def pronouns(interaction: discord.Interaction, visible: bool = False):
embed = discord.Embed(title = "Pronouns", color = myColor, url = "https://pronouns.cc/@aspyn")
embed.set_image(url = "attachment://pronouns.png")
await interaction.response.send_message(embed = embed, file = discord.File('assets/pronouns.png'), ephemeral = not visible)
@tree.command(name="uid",description="Send UID")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(game="Which UID?", visible="Visible to others?")
@app_commands.choices(game=[
app_commands.Choice(name="Genshin", value="609006374"),
app_commands.Choice(name="Honkai Star Rail", value="604969370"),
app_commands.Choice(name="Valorant", value="gwenny#itgrl"),
app_commands.Choice(name="League of Legends", value="XxJynxFan300xX#JYNX"),
app_commands.Choice(name="Steam", value="883076786"),
app_commands.Choice(name="Pokemon Go", value="545621393895"),
app_commands.Choice(name="Pokemon TCG Pocket", value="6220292429679699"),
app_commands.Choice(name="Bungie", value="aspyn#5311")
#TODO add switch fc
]
)
async def uid(interaction: discord.Interaction, game: app_commands.Choice[str], visible: bool = False):
embed = discord.Embed(title = f"{game.name} UID", description = game.value, color = myColor)
await interaction.response.send_message(embed = embed, ephemeral = not visible)
@tree.command(name="pfp",description="Get PFP")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(user="Whose PFP?", visible="Visible to others?")
async def pfp(interaction: discord.Interaction, user: discord.User, visible: bool = False, server: bool = True):
embed = discord.Embed(title = f"{user.name}'s PFP", color = myColor)
image = user.display_avatar.url if server else user.avatar.url
embed.set_image(url = image)
await interaction.response.send_message(embed = embed, ephemeral = not visible)
@tree.command(name="roll",description="Roll Dice!")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(dicestring="Dice Expression", visible="Visible to others?")
async def roll(interaction: discord.Interaction, dicestring: str, visible: bool = False):
try:
result = str(d20.roll(dicestring))
except:
await interaction.response.send_message("Invalid Expression", ephemeral = True)
return
await interaction.response.send_message(result, ephemeral = not visible)
@tree.command(name="rollchar",description="Roll a Character!")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def rollchar(interaction: discord.Interaction, visible: bool = False):
result = ""
for i in range(6):
result += f"{d20.roll("4d6rr1kh3")}\n"
await interaction.response.send_message(result, ephemeral = not visible)
@tree.command(name="rollhelp",description="Link to d20 docs")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def rollhelp(interaction: discord.Interaction):
await interaction.response.send_message("https://github.com/avrae/d20?tab=readme-ov-file#operators", ephemeral = True)
@tree.command(name="echo",description="echo")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def echo(interaction: discord.Interaction, echostring: str, visible: bool = False):
await interaction.response.send_message(echostring, ephemeral = not visible)
@tree.context_menu(name="fixfilespub")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def fixfiles(interaction: discord.Interaction, message: discord.Message):
await interaction.response.defer()
images = []
hardware = path.exists("/dev/dri/renderD128")
params = ["-vaapi_device", "/dev/dri/renderD128", "-vf", "hwupload,scale_vaapi=w=-2:h='min(720,iw)':format=nv12", "-c:v", "h264_vaapi", "-b:v", "1M"] if hardware else ["-c:v", "h264", "-vf", "scale=-2:'min(720,iw)'"]
for attachment in message.attachments:
extension = ""
attachment_data = await attachment.read()
mime = magic.from_buffer(attachment_data, mime = True).split("/")
contentType = mime[0]
contentExtension = mime[1]
match contentType:
case "image":
if contentExtension == "gif":
images.append(await attachment.to_file(filename = f"{attachment.filename.split(".")[0]}.gif"))
continue
command = ["ffmpeg", "-i", "pipe:0", "-f", "image2", "pipe:1"]
extension = "jpg"
case "video":
command = ["ffmpeg", "-i", "pipe:0", *params, "-c:a", "aac", "-pix_fmt", "yuv420p", "-movflags", "frag_keyframe+empty_moov+faststart", "-f", "mp4", "pipe:1"]
extension = "mp4"
case "audio":
command = ["ffmpeg", "-i", "pipe:0", "-loop", "1", "-r", "10", "-i", "assets/sus.webp", "-shortest", *params, "-c:a", "aac", "-pix_fmt", "yuv420p", "-movflags", "frag_keyframe+empty_moov+faststart", "-f", "mp4", "pipe:1"]
extension = "mp4"
case _:
continue
process = run(command, input = attachment_data, stdout = PIPE)
if process.returncode == 0:
discord_file = discord.File(fp = BytesIO(process.stdout), filename = f"{attachment.filename.split(".")[0]}.{extension}")
images.append(discord_file)
if len(images) > 0:
await interaction.followup.send(files = images)
else:
await interaction.followup.send("No files to fix")
@tree.context_menu(name="fixfiles")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
async def fixfiles(interaction: discord.Interaction, message: discord.Message):
await interaction.response.defer(ephemeral = True)
images = []
hardware = path.exists("/dev/dri/renderD128")
params = ["-vaapi_device", "/dev/dri/renderD128", "-vf", "hwupload,scale_vaapi=w=-2:h='min(720,iw)':format=nv12", "-c:v", "h264_vaapi", "-b:v", "1M"] if hardware else ["-c:v", "h264", "-vf", "scale=-2:'min(720,iw)'"]
for attachment in message.attachments:
extension = ""
attachment_data = await attachment.read()
mime = magic.from_buffer(attachment_data, mime = True).split("/")
contentType = mime[0]
contentExtension = mime[1]
match contentType:
case "image":
if contentExtension == "gif":
images.append(await attachment.to_file(filename = f"{attachment.filename.split(".")[0]}.gif"))
continue
command = ["ffmpeg", "-i", "pipe:0", "-f", "image2", "pipe:1"]
extension = "jpg"
case "video":
command = ["ffmpeg", "-i", "pipe:0", *params, "-c:a", "aac", "-pix_fmt", "yuv420p", "-movflags", "frag_keyframe+empty_moov+faststart", "-f", "mp4", "pipe:1"]
extension = "mp4"
case "audio":
command = ["ffmpeg", "-i", "pipe:0", "-loop", "1", "-r", "10", "-i", "assets/sus.webp", "-shortest", *params, "-c:a", "aac", "-pix_fmt", "yuv420p", "-movflags", "frag_keyframe+empty_moov+faststart", "-f", "mp4", "pipe:1"]
extension = "mp4"
case _:
continue
process = run(command, input = attachment_data, stdout = PIPE)
if process.returncode == 0:
discord_file = discord.File(fp = BytesIO(process.stdout), filename = f"{attachment.filename.split(".")[0]}.{extension}")
images.append(discord_file)
if len(images) > 0:
await interaction.followup.send(files = images)
else:
await interaction.followup.send("No files to fix")
@tree.command(name="temperature",description="Convert Temperatures")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(input="Input amount and units (with a space)", visible="Visible to others?")
async def roll(interaction: discord.Interaction, input: str, visible: bool = False):
input.lower()
inputArray = input.split()
tempNum = float(inputArray[0])
tempUnit = inputArray[1]
if len(inputArray) < 2:
await interaction.response.send_message("Invalid Input! No spaces!", ephemeral = True)
tempInF = 0
match tempUnit:
case "f":
tempInF = tempNum
case "c":
tempInF = tempNum * 1.8 + 32
case _:
await interaction.response.send_message("Invalid Unit", ephemeral = True)
return
outputString = ""
outputString += f"{tempInF:.1f} Degrees Fahrenheit\n"
outputString += f"{(tempInF - 32) / 1.8:.1f} Degrees Celsius\n"
embed = discord.Embed(title = "Temperature Conversion", description = outputString, color = myColor)
await interaction.response.send_message(embed = embed, ephemeral = not visible)
@tree.command(name="ethics",description="Code of Ethics :3")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def ethics(interaction: discord.Interaction, visible: bool = False):
ethicsArray = [
"First of all, love the Lord God with your whole heart, your whole soul, and your whole strength.",
"Then, love your neighbor as yourself.",
"Do not murder.",
"Do not commit adultery.",
"Do not steal.",
"Do not covet.",
"Do not bear false witness.",
"Honor all people.",
"Do not do to another what you would not have done to yourself.",
"Deny oneself in order to follow Christ.",
"Chastise the body.",
"Do not become attached to pleasures.",
"Love fasting.",
"Relieve the poor.",
"Clothe the naked.",
"Visit the sick.",
"Bury the dead.",
"Be a help in times of trouble.",
"Console the sorrowing.",
"Be a stranger to the world's ways.",
"Prefer nothing more than the love of Christ.",
"Do not give way to anger.",
"Do not nurse a grudge.",
"Do not entertain deceit in your heart.",
"Do not give a false peace.",
"Do not forsake charity.",
"Do not swear, for fear of perjuring yourself.",
"Utter only truth from heart and mouth.",
"Do not return evil for evil.",
"Do no wrong to anyone, and bear patiently wrongs done to yourself.",
"Love your enemies.",
"Do not curse those who curse you, but rather bless them.",
"Bear persecution for justice's sake.",
"Be not proud.",
"Be not addicted to wine.",
"Be not a great eater.",
"Be not drowsy.",
"Be not lazy.",
"Be not a grumbler.",
"Be not a detractor.",
"Put your hope in God.",
"Attribute to God, and not to self, whatever good you see in yourself.",
"Recognize always that evil is your own doing, and to impute it to yourself.",
"Fear the Day of Judgment.",
"Be in dread of hell.",
"Desire eternal life with all the passion of the spirit.",
"Keep death daily before your eyes.",
"Keep constant guard over the actions of your life.",
"Know for certain that God sees you everywhere.",
"When wrongful thoughts come into your heart, dash them against Christ immediately.",
"Disclose wrongful thoughts to your spiritual mentor.",
"Guard your tongue against evil and depraved speech.",
"Do not love much talking.",
"Speak no useless words or words that move to laughter.",
"Do not love much or boisterous laughter.",
"Listen willingly to holy reading.",
"Devote yourself frequently to prayer.",
"Daily in your prayers, with tears and sighs, confess your past sins to God, and amend them for the future."
"Fulfill not the desires of the flesh; hate your own will.",
"Obey in all things the commands of those whom God has placed in authority over you even though they (which God forbid) should act otherwise, mindful of the Lord's precept, 'Do what they say, but not what they do.'",
"Do not wish to be called holy before one is holy; but first to be holy, that you may be truly so called.",
"Fulfill God's commandments daily in your deeds.",
"Love chastity.",
"Hate no one.",
"Be not jealous, nor harbor envy.",
"Do not love quarreling.",
"Shun arrogance.",
"Respect your seniors.",
"Love your juniors.",
"Pray for your enemies in the love of Christ.",
"Make peace with your adversary before the sun sets.",
"Never despair of God's mercy."
]
number = random.randrange(len(ethicsArray))
embed = discord.Embed(title = f"{number + 1}.", description = ethicsArray[number], color = myColor)
await interaction.response.send_message(embed = embed, ephemeral = not visible)
@tree.command(name="advice",description="Advice for Budding Streamers")
@app_commands.allowed_installs(guilds=True, users=True)
@app_commands.allowed_contexts(guilds=True, dms=True, private_channels=True)
@app_commands.describe(visible="Visible to others?")
async def advice(interaction: discord.Interaction, visible: bool = False):
adviceArray = [
"Be kind and wholesome; positivity is inherently contagious.",
"Be yourself, but be measured: people want authenticity, but too much feels like therapy.",
"Model the behavior you want to see in your followers.",
"Have an extremely cool penis.",
"Be famous, sexually-active, and have a large social media following.",
"Be very famous, have a huge social media following, and be extremely sexually-active.",
"Dig up a skeleton from the cemetery on stream.",
"Find a sick child and film him. Viewers appreciate sick children.",
"Give your dog a math problem and stream him struggling with it. Viewers like to know they're not alone.",
"Add a laugh track to your stream so that your audience knows when to laugh. This will help remind your audience that they have missed out on a golden opportunity to laugh.",
"Never make your streaming schedule too rigid. You want to give yourself an opportunity to take a day off.",
"Film the future. It will give your viewers on opportunity to make trades from which they can profit handsomely.",
"Relish the opportunity to correct your own misstatements. It's not a sign of weakness: it gives viewers comfort to know that you're fallible too.",
"Show your iPad screen when you're playing a mobile game: people love to know that their heroes have iPads.",
"Let your viewers know that you're (eventually) going to tell them how to get rich off of bitcoin; but to shut the fuck, be quiet, and focus on your stream until you're ready to tell them.",
"Charge your phone on camera (optional).",
"The best streamers are even better listeners. Your followers didn't show up to listen to you talk all day — they showed up to listen to you listen.",
"Bend your viewers to your will.",
"Never forget your roots. Your stream started out on Justin.tv, which was a platform designed for traditional content distribution. Give a shout out to Justin every once in a while.",
"Require that users enable Macromedia Flash Player to view your stream.",
"Share some of your passwords with your audience to establish trust.",
"You don't have to stream games! Sometimes your viewers just want a crash course on how to build a nuclear bomb, or a history lesson on Syrian military victories.",
"Don't be afraid to give your viewers a reason to fear and hate you.",
"Play Russian Roulette on stream. Tell your viewers that you'll add a bullet to the chamber for every donation.",
"Donate to yourself on stream to show to your audience that you're just as invested in your own success as they are.",
"Followers remember what they see, and they'll forget the things they never saw.",
"When it's hot out, make sure to drink water on stream. When it's cold out, make sure to drink hot chocolate. Be consistent.",
"Don't be afraid to show your belly button and/or asshole.",
"People who chat the most, donate the least. Eliminate them.",
"Tell your viewers to hold their applause until the end. Ban anybody who doesn't listen.",
"Constantly remind your viewers that 'age is just a number.'",
"Release your complete tax returns and long-form birth certificate on stream so the audience knows you're a red-blooded American."
]
number = random.randrange(len(adviceArray))
embed = discord.Embed(title = f"{number + 1}.", description = adviceArray[number], color = myColor)
await interaction.response.send_message(embed = embed, ephemeral = not visible)
@client.event
async def on_ready():
print("Ready!")
client.run(secrets["token"])