-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbot.py
More file actions
64 lines (46 loc) · 1.67 KB
/
bot.py
File metadata and controls
64 lines (46 loc) · 1.67 KB
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
import discord
from discord.ext import commands
client = commands.Bot( command_prefix = '$' )
@client.command( pass_context = True )
async def Start( ctx ):
author = ctx.message.author
await ctx.send( f'Привет { author.mention } ! Я запустился и готов слушать ваши укозания сир...' )
@client.command()
@commands.is_owner()
async def restartBot(ctx):
await ctx.bot.logout()
await login("ODcxMzY1NzE5MTUyMDMzODUy.YQaQkA.kSecdrdnNLOVwe3ssKtMKw_-CVs", bot=True)
@client.command( pass_context = True )
@client.event
@commands.has_permissions( administrator = True )
async def p( ctx , x: int ):
author = ctx.message.author
money = open( 'Am.txt', 'r' ).readline()
money = int (money)
money = sum([x,money])
f = open('Am.txt', 'w')
f.write(str(money))
await ctx.send( f'В козне после вашего добавления: { money }$' )
@client.command( pass_context = True )
@client.event
@commands.has_permissions( administrator = True )
async def m( ctx , x: int ):
author = ctx.message.author
money = open( 'Am.txt', 'r' ).readline()
money = int (money)
money = money - x
f = open('Am.txt', 'w')
f.write(str(money))
await ctx.send( f'В козне после вашего взятия: { money }$' )
@client.command( pass_context = True )
@client.event
async def s( ctx ):
author = ctx.message.author
money = open( 'Am.txt', 'r' ).readline()
money = int (money)
await ctx.send( f'Сумма: { money }$' )
@client.event
async def on_ready():
print( 'BOT on' )
# Connect
client.run ( 'ODcxMzY1NzE5MTUyMDMzODUy.YQaQkA.kSecdrdnNLOVwe3ssKtMKw_-CVs' )