forked from Bob-the-Bot1/Bob-the-Bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
1311 lines (1115 loc) · 67.4 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
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import math
import discord
from discord.ext import commands
from discord import Embed
import datetime
import setting
import calendar
import asyncio
import colorama
import humanfriendly
import time
#import aiosqlite
import sqlite3
# import logging
from discord.ui import *
import colorsys
import setup_channels
import cases
import json
from time import mktime as mkt
from discord.ext import tasks
from itertools import cycle
import level_rewards
import requests
import configs
import random
import warningsget
from discord.ext import tasks
leveling_db = sqlite3.connect("expData.db")
leveling_cursor = leveling_db.cursor()
@tasks.loop(seconds=5.0)
async def updateit():
await update_status()
#bot = discord.Bot(intents = discord.Intents.all())
bot = commands.Bot(command_prefix=commands.when_mentioned_or("b?"), intents=discord.Intents.all(), case_insensitive = True)
client = bot
level_multiplier = 5
@bot.event
async def on_guild_join(guild:discord.Guild):
setup_channels.check_whether_if(guild.id)
level_rewards.check_whether_if(guild.id)
print(f"Joined {guild.name}, {guild.member_count} members")
@bot.event
async def on_ready():
# await botdb()
leveling_cursor.execute('''CREATE TABLE IF NOT EXISTS users
(server_id INTEGER, user_id INTEGER, xp INTEGER, level INTEGER, PRIMARY KEY (server_id, user_id))''')
leveling_db.commit()
for guild in bot.guilds:
setup_channels.check_whether_if(guild.id)
level_rewards.check_whether_if(guild.id)
updateit.start()
print(colorama.Fore.BLUE+f"We have logged into {client.user}!")
print(colorama.Fore.RED+'We have logged in as {0.user}'.format(bot))
print(colorama.Fore.YELLOW)
async def update_status():
servers = len(client.guilds)
users = len(set(client.get_all_members()))
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=f"{servers} servers | {users} users"))
@bot.event
async def on_message(message:discord.Message):
# await bot.process_application_commands(message)
# await bot.process_commands(message)
guild = message.guild
if message.guild is not None:
xd = level_rewards.get_enabled(guild.id)
if xd is True:
if not message.author.bot:
# Get the user's data from the database or create a new row if the user is new
leveling_cursor.execute('SELECT * FROM users WHERE server_id=? AND user_id=?', (message.guild.id, message.author.id))
user_data = leveling_cursor.fetchone()
if user_data is None:
user_data = (message.guild.id, message.author.id, 0, 0)
leveling_cursor.execute('INSERT INTO users VALUES (?, ?, ?, ?)', user_data)
leveling_db.commit()
# Calculate the XP to be earned for this message
xp_earned = len(message.content) // 10 + 1
channel_id = setup_channels.get_channel_id(message.guild, "levelup")
channel_id = channel_id or message.channel.id
channel = message.guild.get_channel(channel_id)
# Update the user's data in the database with the earned XP and check for level up
leveling_cursor.execute('UPDATE users SET xp=xp+? WHERE server_id=? AND user_id=?', (xp_earned, message.guild.id, message.author.id))
leveling_db.commit()
user_data = leveling_cursor.execute('SELECT * FROM users WHERE server_id=? AND user_id=?', (message.guild.id, message.author.id)).fetchone()
xp, level = user_data[2], user_data[3]
xp_needed = 5 * (level ** 2) + 50 * level + 100
if xp >= xp_needed:
leveling_cursor.execute('UPDATE users SET level=level+1 WHERE server_id=? AND user_id=?', (message.guild.id, message.author.id))
leveling_db.commit()
await channel.send(f"{message.author.mention}", embed=configs.levelup(message.author, level+1))
xd = level_rewards.get_one_role(message.guild.id, int(level+1))
if xd is not None:
role = message.guild.get_role(xd)
await message.author.add_roles(role)
else:return
else:
return
else:
return
else:
return
@client.event
async def on_member_ban(gld:discord.Guild, usr:discord.User):
await asyncio.sleep(0.5) # wait for audit log
found_entry = None
async for entry in gld.audit_logs(limit = 50, action = discord.AuditLogAction.ban, after = datetime.datetime.utcnow() - datetime.timedelta(seconds = 15), oldest_first = False):
if entry.target.id == usr.id:
found_entry = entry
break
if not found_entry:
return
await post_modlog(guild = gld, type = "BAN", user = found_entry.user, target = usr, reason = found_entry.reason)
@client.event
async def on_member_unban(gld, usr):
await asyncio.sleep(0.5) # wait for audit log
found_entry = None
async for entry in gld.audit_logs(limit = 50, action = discord.AuditLogAction.unban, after = datetime.datetime.utcnow() - datetime.timedelta(seconds = 15), oldest_first = False):
if entry.target.id == usr.id:
found_entry = entry
break
if not found_entry:
return
await post_modlog(guild = gld, type = "UNBAN", user = found_entry.user, target = usr, reason = found_entry.reason)
@client.event
async def on_member_join(user:discord.User):
date_format = "%d %b, %Y"
type = "JOIN"
mod_log_channel = user.guild.get_channel(setup_channels.get_channel_id(user.guild, "logging"))
if setting.get_value(user.guild.id, "raid_mode") is True:
await user.ban(reason = "Raid mode was active")
e = discord.Embed(color = configs.MODLOG_COLORS[type], timestamp = datetime.datetime.utcnow())
e.set_author(name = f"{type.capitalize()} | User {user.name}")
e.add_field(name = "Registered on", value = f"{user.created_at.strftime(date_format)}", inline = True)
e.add_field(name = "Joined", value = f"{user.joined_at.strftime(date_format)}", inline = True)
ea = Embed(color=configs.MODLOG_COLORS["KICK"], title=f"{user} was banned", description="User was banned due to raid mode was active")
await mod_log_channel.send(embeds = [e, ea])
else:
if not mod_log_channel:
return
e = discord.Embed(color = configs.MODLOG_COLORS[type], timestamp = datetime.datetime.utcnow())
e.set_author(name = f"{type.capitalize()} | User {user.name}")
e.add_field(name = "Registered on", value = f"{user.created_at.strftime(date_format)}", inline = True)
e.add_field(name = "Joined", value = f"{user.joined_at.strftime(date_format)}", inline = True)
await mod_log_channel.send(embed = e)
@client.event
async def on_member_remove(usr:discord.User):
await asyncio.sleep(0.5) # wait for audit log
found_entry = None
async for entry in usr.guild.audit_logs(limit = 50, action = discord.AuditLogAction.kick, after = datetime.datetime.utcnow() - datetime.timedelta(seconds = 10), oldest_first = False): # 10 to prevent join-kick-join-leave false-positives
if entry.target.id == usr.id:
found_entry = entry
break
if not found_entry:
return
await post_modlog(guild = usr.guild, type = "KICK", user = found_entry.user, target = usr, reason = found_entry.reason)
@client.event
async def on_member_update(before: discord.Member, after: discord.Member):
if before.roles == after.roles:
return
mod_log_id = setup_channels.get_channel_id(before.guild, "logging")
mod_log = before.guild.get_channel(mod_log_id)
if before.roles != after.roles:
embed = discord.Embed(title="ROLE(S) UPDATED", timestamp=datetime.datetime.utcnow())
if len(before.roles) < len(after.roles):
for updated_roles in after.roles:
if updated_roles not in before.roles:
rolementions = [updated_roles.mention]
rolementions.reverse()
role_string = ' '.join(rolementions)
embed.add_field(name=f"These roles were added to {after}", value=role_string, inline=False)
embed.color = configs.MODLOG_COLORS["MUTE"]
if len(before.roles) > len(after.roles):
for updated_roles in before.roles:
if updated_roles not in after.roles:
rolementions = [updated_roles.mention]
rolementions.reverse()
role_string = ' '.join(rolementions)
embed.add_field(name=f"These roles were removed from {after}", value=role_string, inline=False)
embed.color = configs.MODLOG_COLORS["UNMUTE"]
await mod_log.send(embed=embed)
if before.nick == after.nick:
return
if before.nick != after.nick:
embed = Embed(title=f"Nickname changed! of {after.display_name}", timestamp=datetime.datetime.utcnow(), color=configs.MODLOG_COLORS["ROLES_CHANGED"])
embed.add_field(name="BEFORE NAME", value=before.nick, inline=False)
embed.add_field(name="AFTER NAME", value=after.nick, inline=False)
await mod_log.send(embed=embed)
async def post_modlog(guild:discord.Guild, type, user:discord.User, target:discord.User, reason=None, duration=None, roles_given:commands.Greedy[discord.Role] = None):
x = cases.add_case(target.id, type, reason, user.id, datetime.datetime.utcnow(), guild)
await log_case2(guild, (x, target.id, type, reason, user.id, datetime.datetime.utcnow()))
@bot.event
async def on_command_error(context, error):
if isinstance(error, commands.MissingRequiredArgument):
await context.send("Oh no! Looks like you have missed out an argument for this command.")
elif isinstance(error, commands.MissingPermissions):
await context.send("Oh no! Looks like you Dont have the permissions for this command.")
elif isinstance(error, commands.MissingRole):
await context.send("Oh no! Looks like you Dont have the roles for this command.") #bot errors
elif isinstance(error, commands.BotMissingPermissions):
await context.send("Oh no! Looks like I Dont have the permissions for this command.")
elif isinstance(error, commands.BotMissingRole):
await context.send("Oh no! Looks like I Dont have the roles for this command.")
elif isinstance(error, commands.CommandNotFound):
await context.send(f" :warning: {error}.")
elif isinstance(error, commands.MemberNotFound):
await context.send("Please specify the member correctly!!!!!!")
else:
raise error
@bot.slash_command(name="raid_mode", description="Toggles raid mode on or off")
@commands.has_permissions(administrator=True)
async def raid_mode(ctx:discord.Interaction):
value = setting.get_value(ctx.guild.id, "raid_mode")
if value is None or False:
setting.set_value(ctx.guild.id, "raid_mode", True)
await ctx.response.send_message("Successfully set raid mode to True")
else:
setting.set_value(ctx.guild.id, "raid_mode", False)
await ctx.response.send_message("Successfully set raid mode to False")
@bot.slash_command(name="set_logging_channel", description="Sets a logging channel")
@commands.has_permissions(administrator = True)
async def set_logging_channel(ctx:discord.Interaction, channel:discord.TextChannel):
await ctx.response.send_message("Success", ephemeral=True)
setup_channels.set_channel_id(ctx.guild.id, "logging", channel.id)
@bot.slash_command(name="set_welcome_channel", description="Sets a welcome channel")
@commands.has_permissions(administrator = True)
async def set_welcome_channel(ctx:discord.Interaction, channel:discord.TextChannel):
await ctx.response.send_message("Success", ephemeral=True)
setup_channels.set_channel_id(ctx.guild.id, "welcome", channel.id)
@bot.slash_command(name="set_levelup_channel", description="Sets a levelup channel")
@commands.has_permissions(administrator = True)
async def set_logging_channel(ctx:discord.Interaction, channel:discord.TextChannel):
await ctx.response.send_message("Success", ephemeral=True)
setup_channels.set_channel_id(ctx.guild.id, "levelup", channel.id)
@bot.slash_command(name="get_channels", description="Get all the channels set")
@commands.has_permissions(administrator = True)
async def get_channels(ctx:discord.Interaction):
await ctx.response.defer(ephemeral=True)
await asyncio.sleep(5)
logging = setup_channels.get_channel_id(ctx.guild, "logging")
welcome = setup_channels.get_channel_id(ctx.guild, "welcome")
levelup = setup_channels.get_channel_id(ctx.guild, "levelup")
embed = Embed(title="Channels of this server", color=0xfe156d)
embed.add_field(name="Welcome channel", value=f"<#{welcome}>")
embed.add_field(name="Levels channel", value=f"<#{levelup}>")
embed.add_field(name="Logging channel", value=f"<#{logging}>")
await ctx.followup.send(embed=embed, ephemeral=True)
# await ctx.user.
@bot.slash_command(name='nick', description="Change any member's nickname")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(manage_nicknames = True)
async def nick(ctx : discord.Interaction, member: discord.Member = None, *, arg:str = None):
# modlog = discord.utils.get(ctx.guild.text_channels, name=configs.MOD_LOG_CHANNEL_NAME)
# x = case_id()
if member is None:
member = ctx.user
await member.edit(nick=arg)
e = discord.Embed(title=f"Successfully changed name", color=configs.MODLOG_COLORS["BAN"])
if arg is None:
e.description=f"Successfully reset {member.mention}'s nickname for this server."
else:
e.description=f"Successfully changed {member.mention} nickname to ***{arg}***"
await ctx.response.send_message(embed=e)
await post_modlog(ctx.guild, "NICKNAME CHANGE", ctx.user, member, f"Nickname changed of {member.mention} to {arg}", None, None)
# await modlog.send(embed = e)
@client.slash_command(
name="math", description="Solve a math problem"
)
async def calc(interaction:discord.Interaction, problem: str):
# Split the message into a list of words
words = problem.split()
# Make sure we have enough arguments
if len(words) != 3:
await interaction.response.send_message(
"Invalid number of arguments. Use -math [number] [operation] [number]"
)
return
# Get the first number and operation from the message
number1 = float(words[0])
operation = words[1]
# Get the second number from the message
number2 = float(words[2])
# Perform the requested operation
if operation == "+":
result = number1 + number2
elif operation == "-":
result = number1 - number2
elif operation == "*":
result = number1 * number2
elif operation == "/":
if number2 == 0:
await interaction.response.send_message("Error: Cannot divide by zero.")
return
result = number1 / number2
else:
await interaction.response.send_message("Invalid operation. Use +, -, *, or /.")
return
# Send the result to the channel
await interaction.response.send_message(f"Result: {result}")
@bot.slash_command(name='ping', with_app_command=True, description="Get the latency of the bot.")
async def ping(ctx : discord.Interaction):
bot_latency = round(bot.latency * 1000)
conf_embed = Embed(title='Pong!!', description=f"**Bot latency is** `{bot_latency}` ***ms*** *.*", color=0x9b59b6)
await ctx.response.send_message(embed = conf_embed)
@bot.slash_command(name="kick", with_app_command=True, description="Kick any of your member!")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(kick_members = True)
async def kick(ctx : discord.Interaction, member: discord.Member, *, reason='No reason was provided'):
if not member:
return await ctx.response.send_message(f'{ctx.user.mention}, !!!!! :warning: ***No user was specified to kick or you may have forgot to mention one, Please do it again.***')
elif member is ctx.user:
return await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot kick yourself***')
elif member.guild_permissions.administrator:
await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot kick an admin. It can only done by the owner.***')
await ctx.response.send_message(':person_facepalming:')
else:
try:
# x = case_id()
conf_embed = Embed(color=configs.MODLOG_COLORS["KICK"], title="User was Kicked", description=f"{member.mention} was kicked for reason: {reason} by {ctx.user.mention}")
conf_embed2 = Embed(color=configs.MODLOG_COLORS["KICK"], title=f"User was Kicked", description=f"{member.mention} was kicked for reason: {reason} by {ctx.user.mention}")
user_embed = Embed(color=configs.MODLOG_COLORS["KICK"], title='You were kicked', description=f'You were kicked in **{ctx.guild.name}** by Moderator {ctx.user.mention} for reason: {reason}')
await member.send(embed=user_embed)
await member.kick(reason=reason)
await ctx.response.send_message(embed=conf_embed)
# await ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging")).send(embed=conf_embed2)
case_id = cases.add_case(member.id, "kick", reason, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (case_id, member.id, "kick", reason, ctx.user.id, datetime.datetime.utcnow()))
except discord.Forbidden:
pass
# else:
# await ctx.response.send_message(f"{ctx.user.mention} **Error: ** Bans/Kicks is disabled in this server. Please ask anyone who has admin permissions to do the action is case of emergency!")
@client.slash_command(
name="8ball",
description="Ask the magic 8-ball a question."
)
async def ball(interaction:discord.Interaction, query: str):
# Get the question from the message
question = query
# Check if the question is empty
if len(question) == 0:
await interaction.respond("You didn't ask a question!")
return
# Select a random response
responses = [
"It is certain.",
"It is decidedly so.",
"Without a doubt.",
"Yes - definitely.",
"You may rely on it.",
"As I see it, yes.",
"Most likely.",
"Outlook good.",
"Yes.",
"Signs point to yes.",
"Reply hazy, try again.",
"Ask again later.",
"Better not tell you now.",
"Cannot predict now.",
"Concentrate and ask again.",
"Don't count on it.",
"My reply is no.",
"My sources say no.",
"Outlook not so good.",
"Very doubtful.",
]
response = random.choice(responses)
# Send the response
await interaction.response.send_message(f"Question: {question}\nAnswer: {response}")
@bot.slash_command(name="warn", description = "Warns a user provided!")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(moderate_members=True)
async def warn(ctx:discord.Interaction, member:discord.Member,*, reason:str = "No reason was provided"):
if member.id == ctx.user.id:
await ctx.response.send_message(f"{ctx.user.mention} You cannot warn your self")
elif member.guild_permissions.administrator:
await ctx.response.send_message(f"{ctx.user.mention} You cannot warn an adminstrator!")
else:
warn_code = f'{ctx.guild.id}-{member.id}-{len(warningsget.get_warnings(ctx.guild.id, member.id)) + 1}'
cur = sqlite3.connect('warnings.db')
conn = cur.cursor()
# Store the warning in the database
conn.execute("INSERT INTO warnings (server_id, user_id, warn_code, moderator_id, reason) VALUES (?, ?, ?, ?, ?)",
(ctx.guild.id, member.id, warn_code, ctx.user.id, reason))
cur.commit()
warnings = warningsget.get_warnings(ctx.guild.id, member.id)
if len(warnings) <= 0:
first_warning = True
else:
first_warning = False
count = len(warnings)
conf_embed = Embed(title='Warned a User', description=f"Gave `1` strike/warning to {member.mention}. They now have totally ***{count}*** {'warning' if first_warning else 'warnings'} for reason --> **{reason}**.", color=discord.Color.blue())
user_embed = Embed(title='You were warned!', description=f"You were given a warning/strike in {ctx.guild.name} by {ctx.user.mention} for reason --> **{reason}**. You now totally have ***{count}*** {'warning' if first_warning else 'warnings'}.", color=discord.Color.blue())
await ctx.response.send_message(embed=conf_embed)
await member.send(embed=user_embed)
# type = "WARN"
# mod_log_channel = discord.utils.get(ctx.guild.text_channels, name = configs.MOD_LOG_CHANNEL_NAME)
# if not mod_log_channel:
# return
e = discord.Embed(color = 0xff0000, timestamp = datetime.datetime.utcnow())
# x = case_id()
e.set_author(name = f"WARN")
e.add_field(name = "Target", value = f"<@{member.id}> ({member})", inline = True)
e.add_field(name = "Moderator", value = f"<@{ctx.user.id}> ({ctx.user})", inline = True)
e.add_field(name = "Reason", value = reason, inline = False)
case_id = cases.add_case(member.id, "warn", reason, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (case_id, member.id, "warn", reason, ctx.user.id, datetime.datetime.utcnow()))
# await mod_log_channel.send(embed = e)
@bot.slash_command(name="warnings", description = "Get warns of user")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(kick_members=True)
async def warnings(ctx:discord.Interaction, member:discord.Member):
warnings = warningsget.get_warnings(ctx.guild.id, member.id)
embed = Embed(title=f"Warnings for {member}", timestamp=datetime.datetime.utcnow())
embed.set_author(name=member, icon_url=member.avatar or ctx.guild.icon)
if len(warnings) <= 0:
await ctx.response.send_message(f"No warnings were found for {member.mention}.")
else:
for warning in warnings:
embed.add_field(name=f"Case ID: {warning[2]}", value=f"Warning Given by: <@{warning[3]}> for reason: {warning[4]}", inline=False)
await ctx.response.send_message(embed=embed)
@bot.slash_command(name="log_all", description = "Logs all cases in the log channel.")
@commands.has_permissions(administrator=True)
async def log_all(ctx:discord.Interaction):
conn = sqlite3.connect('moderation_cases.db')
cur = conn.cursor()
cur.execute("SELECT * FROM moderation_cases WHERE guild = ?", (ctx.guild.id))
data = cur.fetchall()
channelid = setup_channels.get_channel_id(ctx.guild, "logging")
channel = ctx.guild.get_channel(channelid)
@bot.slash_command(name="rmwarn", description = "Removes a warning of user with the code provided")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(administrator=True)
async def rmwarn(ctx : discord.Interaction ,*,id_of_warn):
warning = warningsget.get_warning_by_code(ctx.guild.id, id_of_warn)
db = sqlite3.connect("warnings.db")
cur = db.cursor()
cur.execute("DELETE FROM warnings WHERE server_id = ? AND warn_code = ?", (ctx.guild.id, id_of_warn))
db.commit()
user = ctx.guild.get_member(warning[1])
embed = Embed(title=f"Warning deleted | Code: {id_of_warn} ", description=f"Warning given by <@{warning[3]}>, for Reason {warning[4]}. Warning was given to {user.mention}")
mod = ctx.guild.get_member(warning[3])
embed.set_author(name=user.display_name, icon_url=user.avatar or mod.avatar)
embed.set_thumbnail(url=user.avatar)
await ctx.response.send_message(embed=embed)
await ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging")).send(embed=embed)
@bot.slash_command(name="time", description="Get your local time.")
# @app_commands.guilds(discord.Object(id=guild_id))
async def time(ctx : discord.Interaction):
time_now = datetime.datetime.now()
hours = time_now.hour
year = time_now.year
month = time_now.month
minutes = time_now.minute
days = time_now.day
date_time = datetime.datetime(year, month, days)
end_date = date_time + datetime.timedelta(hours=hours, minutes=minutes)
date_tuple=(end_date.year, end_date.month, end_date.day, end_date.hour, end_date.minute, end_date.second)
epochtime = mkt(datetime.datetime(*date_tuple).timetuple())
stringtime = str(epochtime)
timelst = []
timelst.extend(stringtime)
prepared = timelst[:10]
strtime1 = ','.join(prepared)
strtime2 = strtime1.replace(',',"")
inttime = int(strtime2)
await ctx.response.send_message(f"The current time is <t:{inttime}:F>")
@bot.slash_command(name="timeout", description="Timeout/Mute a member.")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(moderate_members=True)
async def timeout(ctx : discord.Interaction, user:discord.Member=None,*, time='2m', reason="No reason was provided"):
time2 = humanfriendly.parse_timespan(time)
if user is None:
await ctx.response.send_message(f'{ctx.user.mention}, !!!!! :warning: ***No user was specified to timeout or you may have forgot to mention one, Please do it again.***')
elif user == ctx.user:
await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot timeout yourself***')
elif user.guild_permissions.administrator:
await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot timeout an admin. It can only done by the owner.***')
await ctx.response.send_message(':person_facepalming:')
else:
duration = discord.utils.utcnow() + datetime.timedelta(seconds=time2)
await user.send(f'You were timed out in **{ctx.guild.name}** for reason:{reason} by mod: {ctx.user.mention}. Duration: {time}.')
await user.timeout(duration, reason=reason)
await ctx.response.send_message(f'**Timed out {user.mention} for {time} by mod: {ctx.user.mention} for reason:** \n*{reason}*.')
# await post_modlog(guild=ctx.guild, type="TIMEOUT", user=ctx.user, target=user, reason=reason, duration=time)
caseid = cases.add_case(user.id, "timeout", reason+"for"+time, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (caseid, user.id, "timeout", reason+" ."+"Timed out "+"for "+time, ctx.user.id, datetime.datetime.utcnow()))
@bot.slash_command(name='purge', description='Clear no.of messages in a given channel')
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(manage_messages=True)
async def purge(ctx : discord.Interaction,amount : int = 2):
# log_channel = discord.utils.get(ctx.guild.text_channels, name = configs.MOD_LOG_CHANNEL_NAME)
# if not log_channel:
# return
# x = case_id()
e = discord.Embed(title=f"Cleared messages", description=f"Cleared `{amount}` message(s) in <#{ctx.channel.id}> by Moderator {ctx.user.mention}")
await ctx.channel.purge(limit=amount+1)
await ctx.response.send_message(f"Deleted `{amount}` message(s) in channel <#{ctx.channel.id}> by Moderator {ctx.user.mention}")
#await log_channel.send(embed = e)
log_Channel = ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging"))
await log_Channel.send(embed=e)
@bot.slash_command(name='ban', description='Ban a member from the server')
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(ban_members=True)
async def ban( ctx : discord.Interaction, user:discord.Member=None, *, reason="No reason was provided"):
if user is None:
cmdusage = Embed(title='Ban', description='-> Command for Banning a User is `*ban`. \n -> Usage: `*ban @user [reason]`. \n **Note : ** ***You can user userIds, role IDs instead @ pinging.***')
await ctx.response.send_message(embed=cmdusage)
await ctx.response.send_message(f'{ctx.user.mention}, !!!!! :warning: ***No user was specified to ban or you may have forgot to mention one, Please do it again.***')
elif user == ctx.message.author:
await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot ban yourself***')
elif user.guild_permissions.administrator:
await ctx.response.send_message(f'{ctx.user.mention}, :warning: ***You cannot ban an admin. It can only done by the owner.***')
await ctx.response.send_message(':person_facepalming:')
else:
conf_embed = Embed(color=0xff0000, title="User was banned", description=f"{user.mention} was banned for reason: {reason} by {ctx.user.mention}")
user_embed = Embed(color=0xff0000, title='You were banned', description=f'You were banned in **{ctx.guild.name}** by Moderator {ctx.user.mention} for reason: {reason}')
await ctx.response.send_message(embed=conf_embed)
if user.bot:
return
else:
await user.send(embed=user_embed)
await user.ban(reason=reason)
# await post_modlog(guild = ctx.guild, type = "BAN", user = ctx.user, target = user, reason = reason)
case_id = cases.add_case(user.id, "ban", reason, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (case_id, user.id, "ban", reason, ctx.user.id, datetime.datetime.utcnow()))
@bot.slash_command(name="unban", description='UNban a user from the server.')
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(ban_members=True)
#@commands.guild_only()
async def unban(ctx:discord.Interaction, member: discord.User, *, reason="No reason was provided"):
await ctx.guild.unban(member, reason=reason)
await ctx.response.send_message(f'**{member.mention}** has been unbanned from the server by {ctx.user.mention} for reason: {reason}.')
await post_modlog(guild = ctx.guild, type = "UNBAN", user = ctx.user, target = member, reason = reason)
case_id = cases.add_case(member.id, "unban", reason, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (case_id, member.id, "unban", reason, ctx.user.id, datetime.datetime.utcnow()))
@bot.slash_command(name='tempban', description = "Banning a member for a given period of time.")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(ban_members=True)
async def tempban(ctx:discord.Interaction, member: discord.User, duration: str = None, *, reason="No reason was provided"):
time2 = humanfriendly.parse_timespan(duration)
if duration is None:
await ctx.response.send_message('What!, Tempban means banning someone for a period of time')
else:
time3 = datetime.datetime.utcnow() + datetime.timedelta(seconds=time2)
await ctx.guild.ban(member)
await ctx.response.send_message(f'{member} has been banned for {duration} for reason: {reason} by moderator: {ctx.user.mention}')
# await post_modlog(guild = ctx.guild, type = "TEMPBAN", user = ctx.user, target = member, reason = reason, duration=duration)
caseid = cases.add_case(member.id, "tempban", reason+" ."+"Timed out "+"for "+time, ctx.user.id, datetime.datetime.utcnow(), ctx.guild.id)
await log_case(ctx, (caseid, member.id, "tempban", reason+" ."+"Timed out "+"for "+time, ctx.user.id, datetime.datetime.utcnow()))
await asyncio.sleep(time3)
await ctx.guild.unban(member)
@bot.slash_command(name='untimeout',description="remove timeout from a member")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(moderate_members=True)
async def untimeout(ctx:discord.Interaction, member: discord.Member, *, reason="No reason was provided."):
if member.is_timed_out():
await member.timeout(datetime.timedelta(seconds=1))
await ctx.response.send_message(f"Successfully removed {member.mention} 's timeout.")
else:
await ctx.response.send_message(f" {member.mention} isn't timed out.")
@client.slash_command(name="giverole", description="Gives a role to a member")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(manage_roles=True)
async def giverole(ctx:discord.Interaction, member: discord.Member, *, role: discord.Role):
if role.position > ctx.user.top_role.position: #if the role is above users top role it sends error
if member.id == ctx.user.id:
name = "yourself"
else:
name = member.mention
embed = Embed(title=f"Error", description=f":person_facepalming: That role which you wanna give to {name} is above your reach!! Please ask a higher moderator whose role is above than {role.mention} to do this action. Thank you :)")
await ctx.reply(embed=embed)
else:
# case = case_id()
conf_embed = Embed(title=f'Assigned a Role to a Member.', description=f'Assigned {role.mention} role to {member.mention}.', color=discord.Color.magenta())
conf_embed.add_field(name="Moderator: ", value=f"{ctx.user.mention}", inline=False)
conf_embed.add_field(name="Subject: ", value=f"{member.mention}", inline=False)
conf_embed.set_author(name=f"{member.name}", icon_url=member.avatar)
conf_embed.set_thumbnail(url=member.avatar)
await member.add_roles(role, reason="No reason")
await ctx.response.send_message(embed=conf_embed)
modlog = ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging"))
modlog = modlog or ctx.channel
await modlog.send(embed=conf_embed)
@client.slash_command(name="removerole", description="Removes a role from a user")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(manage_roles=True)
async def removerole(ctx:discord.Interaction, member: discord.Member, *, role: discord.Role):
if role.position > ctx.user.top_role.position: #if the role is above users top role it sends error
if member.id == ctx.user.id:
name = "yourself"
else:
name = member.mention
embed = Embed(title=f"Error", description=f":person_facepalming: That role which you wanna remove from {name} is above your reach!! Please ask a higher moderator whose role is above than {role.mention} to do this action. Thank you :)")
await ctx.reply(embed=embed)
else:
# case = case_id()
conf_embed = Embed(title=f'Removed a Role from a Member.', description=f'Removed {role.mention} role from {member.mention}.', color=discord.Color.magenta())
conf_embed.add_field(name="Moderator: ", value=f"{ctx.user.mention}", inline=False)
conf_embed.add_field(name="Subject: ", value=f"{member.mention}", inline=False)
conf_embed.set_author(name=f"{member.name}", icon_url=member.avatar)
conf_embed.set_thumbnail(url=member.avatar)
await ctx.response.send_message(f'Removing **{role}** role from {member.mention}')
await member.remove_roles(role)
await ctx.followup.send(embed=conf_embed)
modlog = ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging"))
modlog = modlog or ctx.channel
await modlog.send(embed=conf_embed)
@bot.slash_command(name = "test", description = "Testing")
# @app_commands.guilds(discord.Object(id = guild_id))
@commands.has_permissions(administrator = True)
async def test(ctx: discord.Interaction):
await ctx.response.send_message("hi", ephemeral=True)
@bot.slash_command(name='info',description="Gives the information about bot.")
# @app_commands.guilds(discord.Object(id=guild_id))
async def info(ctx:discord.Interaction):
e = Embed(title="Information About me.", timestamp=datetime.datetime.utcnow(), color=0xffffff)
e.add_field(name="Creators: ", value="Coder_DO_As_Impossible#1237 -> <@774332691008061502> \n csdaniel#9326 -> <@1075087931980652544> \n ExplodeCode#2008 -> <@896814282317131848> \n Kyro#2945 -> <@811771148613189652>", inline=False)
date_format = "%d %b, %Y"
e.add_field(name="Created at: ", value=f"{bot.user.created_at.strftime(date_format)}", inline=False)
e.set_author(name=str(bot.user.name), icon_url=bot.user.avatar)
e.set_thumbnail(url=bot.user.avatar)
await ctx.response.send_message(embed=e)
@client.slash_command(
name="calendar", description="View the calendar"
)
async def cal(interaction:discord.Interaction):
yy = datetime.datetime.now().year
mm = datetime.datetime.now().month
await interaction.respond(calendar.month(yy, mm))
@bot.slash_command(name="lock", with_app_command=True, description="Locks a channel")
# @app_commands.guilds(discord.Object(id=guild_id))
@commands.has_permissions(manage_channels=True)
async def lock(ctx,time:str=None, role:discord.Role=None, channel: discord.TextChannel=None):
modlog = ctx.guild.get_channel(setup_channels.get_channel_id(ctx.guild, "logging"))
role = role or ctx.guild.default_role
channel = channel or ctx.channel
# count = case_id()
embed=discord.Embed(title=f"Locked a channel", timestamp=datetime.datetime.utcnow(), color=configs.MODLOG_COLORS["KICK"])
timetext = f"for time {time}"
embed.add_field(name=f"Locked channel {channel.name} for {role.name} ",value=f"Locked channel <#{channel.id}> for {role.name}", inline=False)
await ctx.response.send_message("Done!!")
if time:
time2 = humanfriendly.parse_timespan(time)
time3 = datetime.datetime.utcnow() + datetime.timedelta(seconds=time2)
embed.add_field(name="For time", value=f"{timetext}")
await channel.send(embed=embed)
modlog = modlog or ctx.channel
await modlog.send(embed=embed)
overwrite = channel.overwrites_for(role)
overwrite.send_messages = False
asyncio.sleep(time3)
overwrite = channel.overwrites_for(role)
overwrite.send_messages = True
await channel.set_permissions(role, overwrite=overwrite)
# x = case_id()
unlock_embed = discord.Embed(title= (f"UNLOCKED"),description= (f"**{channel.mention}** HAS BEEN UNLOCKED FOR **{role}**"),colour=0x00FFF5,)
unlock_embed.set_footer(text=ctx.user.name, icon_url=ctx.user.avatar)
unlock_embed.set_author(name=client.user.name, icon_url=client.user.avatar)
unlock_embed.set_thumbnail(url=ctx.guild.icon)
await ctx.response.send_message(embed=unlock_embed, delete_after = 60)
modlog = modlog or ctx.channel
await modlog.send(embed=unlock_embed)
else:
pass
await channel.send(embed=embed)
modlog = modlog or ctx.channel
await modlog.send(embed=embed)
overwrite = channel.overwrites_for(role)
overwrite.send_messages = False
await channel.set_permissions(role, overwrite=overwrite)
@bot.slash_command(name="rank", description="Gives user rank")
async def rank(ctx:discord.Interaction, member: discord.Member=None):
# await ctx.response.send_message("Done", ephemeral=True)
member = member or ctx.user
await ctx.response.defer()
# get user exp
leveling_cursor.execute('SELECT * FROM users WHERE server_id=? ORDER BY xp DESC', (ctx.guild.id,))
user_data = leveling_cursor.fetchall()
if len(user_data) == 0:
await ctx.followup.send(f'No one on this server has earned any XP yet!')
else:
level_variables = {"xp": 0, "level": 0}
rank = 1
for data in user_data:
if data[1] == member.id:
level_variables["xp"] = data[2]
level_variables["level"] = data[3]
break
rank += 1
xp_needed = 5 * (level_variables["level"] ** 2) + 50 * level_variables["level"] + 100
xp_needed_next_level = 5 * ((level_variables["level"]+1) ** 2) + 50 * (level_variables["level"]+1) + 100
xp_needed_current_level = xp_needed_next_level - xp_needed
xp_percentage = round(((xp_needed - level_variables["xp"]) / xp_needed_current_level)*100)
xp = level_variables["xp"]
embed = discord.Embed(title=f"Stats for {member.name}", colour=discord.Colour.gold())
embed.add_field(name="Level", value=str(level_variables["level"]))
embed.add_field(name="Exp", value=f"{xp}/{xp_needed}")
embed.add_field(name="Rank", value=f"{rank}/{ctx.guild.member_count}")
# embed.add_field(name="Level Progress", value=f"{xp_percentage}%")
# await ctx.send(embed=embed)
embed.set_author(name=member, icon_url=member.avatar)
embed.set_thumbnail(url=member.avatar)
await ctx.followup.send(embed=embed)
@bot.slash_command(
name="bored",
description="Generates a random activity to do when feeling bored.",
)
async def bored(interaction:discord.Interaction):
response = requests.get("https://www.boredapi.com/api/activity")
json_data = json.loads(response.text)
activity = json_data["activity"]
await interaction.response.send_message(f"Why not try to: {activity}")
client.slash_command(
name="announce",
description="Make an announcement."
)
async def announce(interaction:discord.Interaction, *, message: str):
await interaction.response.send_message(message)
@client.slash_command(
name="quote", description="Get a random quote."
)
async def quote(interaction:discord.Interaction):
response = requests.get("https://quotable.io/random")
json_data = json.loads(response.text)
content = json_data["content"]
author = json_data["author"]
embed = discord.Embed(title="Quote", description=content, color=0x00FF33)
embed.set_footer(text=author)
await interaction.response.send_message(embed=embed)
@client.slash_command(name="hello", description="Say hi!")
async def hello(interaction:discord.Interaction):
greetings = ["Hello", "Hi", "Greetings", "Hola", "Bonjour", "Konnichiwa", "Namaste", "Aaram Ri"]
username = interaction.user.name
await interaction.response.send_message(f"{random.choice(greetings)} {username}!")
#animal picture commands
@client.slash_command(name="cat", description="Get a random cat picture")
async def hello(interaction:discord.Interaction):
username = interaction.user.name
await interaction.response.send_message(f"Meow {username}! https://cataas.com/cat")
@client.slash_command(name="dog", description="Get a random dog picture")
async def hello(interaction:discord.Interaction):
username = interaction.user.name
response = requests.get('https://dog.ceo/api/breeds/image/random')
if response.status_code == 200:
data = response.json()
await interaction.response.send_message(f"Woof {username}!")
await interaction.response.send_message(data["message"])
else:
await interaction.response.send_message("Error: failed to fetch dog image")
@client.slash_command(name="fox", description="Get a random fox picture")
async def hello(interaction:discord.Interaction):
username = interaction.user.name
response = requests.get('https://some-random-api.ml/animal/fox')
if response.status_code == 200:
data = response.json()
await interaction.response.send_message(f"Howl {username}!")
await interaction.response.send_message(data["image"])
else:
await interaction.response.send_message("Error: failed to fetch fox image")
@client.slash_command(name="bird", description="Get a random bird picture")
async def hello(interaction:discord.Interaction):
username = interaction.user.name
response = requests.get('https://some-random-api.ml/animal/bird')
if response.status_code == 200:
data = response.json()
await interaction.response.send_message(f"Tweet {username}!")
await interaction.response.send_message(data["image"])
else:
await interaction.response.send_message("Error: failed to fetch bird image")
@client.slash_command(
name="search", description="Search the internet."
)
async def search(interaction:discord.Interaction, query: str, engine: str):
engine.lower()
print(engine) # Choice(name='Google', value='google')
query = query.rstrip().replace(" ", "+")
if engine == "google":
await interaction.respond(f"https://google.com/search?q={query}")
elif engine == "duckduckgo":
await interaction.respond(f"https://duckduckgo.com/?q={query}")
elif engine == "bing":
await interaction.respond(f"https://bing.com/search?q={query}")
elif engine == "letmegoogle":
await interaction.respond(
f"https://letmegooglethat.com/?q={query}"
)
elif engine == "youtube":
await interaction.response.send_message(f"https://www.youtube.com/results?search_query={query}")
else:
await interaction.response.send_message("Invalid engine.")
@client.slash_command(name="wouldyourather", description="Generate a Would You Rather question.")
async def wouldyourather(interaction:discord.Interaction):
questions = ["Would you rather live without internet for a week or without phone?",
"Would you rather have the power to be invisible or to read minds?",
"Would you rather have a pet dragon or a pet unicorn?",
"Would you rather travel to the past or the future?",
"Would you rather be a famous athlete or a famous musician?",
"Would you rather have the power of flight or the power of telekinesis?",
"Would you rather knowing how to code anything or know how to design anything?",
"Would you rather having an AI crush or being an AI?",
"Would you rather drinking your favourite food as a liquid or eating your favourite drink as a food?",
"Would you rather being lonely or being over popular?",
"Would you rather being a famous TikToker or famous YouTuber?",
"Would you rather eat a bug or a fly?",
"Would you rather lick the floor or a broom?",
"Would you rather eat ice cream or cake?",
"Would you rather clean a toliet or a babys diaper",
"Would you rather lick your keyboard or mouse?",
"Would you rather wash your hair with mash potatoes or cranberry sauce?",
"Would you rather team up with Wonder Woman or Captain Marvel?",
"Would you rather want to find true love or win lottery next month?",
"Would you rather be forced to sing along or dance to every song you hear?",
" Would you rather have everyone you know be able to read your thoughts or for everyone you know to have access to your Internet history?",
"Would you rather be chronically under-dressed or overdressed?",
"Would you rather lose your sight or your memories?",
"Would you rather have universal respect or unlimited power?",
"Would you rather give up air conditioning and heating for the rest of your life or give up the Internet for the rest of your life?",
"Would you rather swim in a pool full of Nutella or a pool full of maple syrup?","Would you rather labor under a hot sun or extreme cold?",
"Would you rather stay in during a snow day or build a fort?","Would you rather buy 10 things you don’t need every time you go shopping or always forget the one thing that you need when you go to the store?",
"Would you rather never be able to go out during the day or never be able to go out at night?",
"Would you rather have a personal maid or a personal chef?",
"Would you rather have beyoncé’s talent or Jay-Z‘s business acumen?",
"Would you rather be an extra in an Oscar-winning movie or the lead in a box office bomb?",
"Would you rather vomit on your hero or have your hero vomit on you?",
"Would you rather communicate only in emoji or never be able to text at all ever again?",
"Would you rather be royalty 1,000 years ago or an average person today?",
"Would you rather lounge by the pool or on the beach?",
"Would you rather wear the same socks for a month or the same underwear for a week?",
"Would you rather work an overtime shift with your annoying boss or spend full day with your mother-in-law?",
"Would you rather cuddle a koala or pal around with a panda?",
"Would you rather have a sing-off with Ariana Grande or a dance-off with Rihanna?",
"Would you rather watch nothing but Hallmark Christmas movies or nothing but horror movies?",
"Would you rather always be 10 minutes late or always be 20 minutes early?",
"Would you rather have a pause or a rewind button in your life?",
"Would you rather lose all your teeth or lose a day of your life every time you kissed someone?",
"Would you rather drink from a toilet or pee in a litter box?",
"Would you rather be forced to live the same day over and over again for a full year, or take 3 years off the end of your life?",
"Would you rather never eat watermelon ever again or be forced to eat watermelon with every meal?",
"Would you rather go to Harvard but graduate and be jobless, or graduate from another college and work for Harvard",
"Would you rather the aliens that make first contact be robotic or organic?",
"Would you rather lose the ability to read or lose the ability to speak?",
"Would you rather have a golden voice or a silver tongue?",
"Would you rather be covered in fur or covered in scales?",
"Would you rather be in jail for a year or lose a year off your life?",
"Would you rather have one real get out of jail free card or a key that opens any door?",
"Would you rather know the history of every object you touched or be able to talk to animals?",
"Would you rather be married to a 10 with a bad personality or a 6 with an amazing personality?",
"Would you rather be able to talk to land animals, animals that fly, or animals that live under the water?",
"Would you rather have all traffic lights you approach be green or never have to stand in line again?",
"Would you rather spend the rest of your life with a sailboat as your home or an RV as your home?",
"Would you rather marry someone pretty but stupid or clever but ugly?",
"Would you rather give up all drinks except for water or give up eating anything that was cooked in an oven?",
"Would you rather be able to see 10 minutes into your own future or 10 minutes into the future of anyone but yourself?",
"Would you rather have to fart loudly every time you have a serious conversation or have to burp after every kiss?",
"Would you rather become twice as strong when both of your fingers are stuck in your ears or crawl twice as fast as you can run?",