-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
34 lines (28 loc) · 1.07 KB
/
bot.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
import asyncio
import discord
client = discord.Client()
@client.event
async def on_ready():
print(client.user.name)
print(client.user.id)
print("===========")
await client.change_presence(game=discord.Game(name="반갑습니다 :D", type=1))
@client.event
async def on_message(message):
now = datetime.datetime.now()
if message.author.bot:
return None
if message.content.startswith('!채널'):
await client.send_message(message.channel,message.channel.id)
if message.content.startswith('!role'):
role=""
rolename=message.content.split(" ")
member=discord.utils.get(client.get_all_members(), id=rolename[1])
for i in message.server.roles:
if i.name == rolename[2]:
role = i
break
await client.add_roles(member, role)
if message.channel.is_private
await client.send_message(getchannel("650619509303934977"),message.content)
client.run(NTQzNTMwMTg1NDQ2NjUzOTcz.XewwVA.A4g5bxfEO0-K3YVc_yLMloO0cOg)