-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
214 lines (175 loc) · 6.92 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
import discord, time, os
from discord.ext import commands
from replit import db
import random, requests
# #
class Sequence:
_Author_Id = "Your ID Here"
_Farming = False
# #
class Data:
Token = ""
Sleep = 5
# #
class Path:
Tokens = "data/tokens.txt"
Proxies = "data/proxies.txt"
# #
class Database:
Load = []
db["Used"] = []
db["Starter"] = []
db["Ratelimited"] = []
db["Proxies"] = []
# #
class Dank:
class Identifier:
Max = 9
class Amounts:
Betting = "max"
SnakeEye = "max"
Growth_Commands = ["beg", "hunt", "fish", "dig"]
Starter_Commands = ["newplayerpack", "meme", "bet", "se"]
Keep_Items = ["bank", "meme", "normie", "daily", "pizza"]
Sell_Items = ["boar", "fish", "skunk", "trash", "rarefish"]
#-----------------#
class guru:
bot = ""
def __init__(self, prefix: str, author_id: str):
guru.bot = commands.Bot(
self_bot = True,
command_prefix = prefix
)
async def SendMessage(channel_id: str, message_content: str):
channel = bot.get_channel(
channel_id
)
#----- READ ------#
# This is for the current session of the bot, not any other tokens
#-----------------#
await channel.send(
message_content
)
def SendMessageAs(channel_id: str, message_content: str, token: str):
try:
user = requests.get(
"https://discordapp.com/api/v9/users/@me",
headers = {
"Authorization": token
}
)
user_json = user.json()
user_email = user_json["email"]
user_identification = user_json["id"]
if user.status_code == 200:
print (" [🟢] Logged into {} ({})".format(user_email, user_identification))
try:
r = requests.post(
"https://discordapp.com/api/v9/channels/{}/messages".format(
channel_id
), headers = {
"Authorization": token
}, json = {
"content": message_content
}
)
if r.status_code == 200:
print (" [🟢] Success! | ({})".format(channel_id))
else:
print (" [🔴] Failed | Message could not be sent")
except Exception as E:
print (E)
else:
print (" [🔴] Failed to Login")
except Exception as E:
print (E)
#--------#
bot = guru(prefix = "dank", author_id = Sequence._Author_Id)
@guru.bot.event
async def on_ready():
print (" [👍] Ready as {} ({})\n#----------------------#".format(guru.bot.user.name, guru.bot.user.id))
@guru.bot.command(aliases=["load"])
async def queue(ctx):
with open(Path.Tokens, "r") as tokens:
Database.Load = []
Database.Load += [token.strip() for token in tokens.readlines()]
await ctx.send(
embed = discord.Embed(
title = "Loaded Tokens",
description = "{} was successfully loaded into the database".format(len(Database.Load))
)
)
@guru.bot.command(aliases=["quit"])
async def stop(ctx):
if Sequence._Farming == True:
Sequence._Farming = False
await ctx.send(
embed = discord.Embed(
title = "Stopped Farming",
description = "Current farming session was ended"
)
)
else:
await ctx.send(
embed = discord.Embed(
title = "Error",
description = "You weren't previously farming"
)
)
@guru.bot.command(aliases=["farm"])
async def start(ctx):
if Sequence._Farming == False and len(Database.Load) > int(Dank.Identifier.Max):
await ctx.send(
embed = discord.Embed(
title = "Bot Started",
description = "Running with {} tokens".format(len(Database.Load))
)
)
# #
Sequence._Farming = True
while Sequence._Farming == True:
for Token in Database.Load:
if Token in set(db["Used"]):
for Command in Dank.Growth_Commands:
bot.SendMessageAs(ctx.channel.id, Command, Token)
time.sleep(int(Data.Sleep))
else:
for Command in Dank.Starter_Commands:
if Command == "newplayerpack" or "meme":
Parsed = "pls use {}".format(Command)
else:
Parsed = "pls {} {}".format(Command, Dank.Amounts.Betting)
db["Used"] += [Token]
bot.SendMessageAs(ctx.channel.id, Parsed, Token)
else:
await ctx.send(
embed = discord.Embed(
title = "Error",
description = "Either the bot is already farming, or you dont have over 9 tokens.."
)
)
@guru.bot.command(aliases=["recieve"])
async def get(ctx):
_Total = 0
_Success = 0
for Token in Database.Load:
try:
bot.SendMessageAs(ctx.author.id, "", Token)
print (" [🟢] Sent all coins to {} ({})".format(Sequence._Author_Id, Token))
_Success += 1
_Total += 1
except:
print (" [🔴] Could not send coins ({})".format(Token))
_Total += 1
await ctx.send(
embed = discord.Embed(
title = "Output",
description = "(`{}`/`{}`) was the amount of bots that given money to you"
)
)
#_-------------_#
guru.bot.run(Data.Token, bot = False)
#_-------------_#
# I knew you would scroll to the bottom, but I want to inform you about the bot.
# This may not work as of me not knowing what I am doing right now since I have not been working on python for weeks.
# Please create an issue and tell me what happend / is happening