-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.py
128 lines (108 loc) · 3.95 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
import discord, asyncio, replit, random, os
from discord.ext import commands
from discord.ext import tasks
from j4j.host import (
client,
workers
)
if True:
BLACKLISTED = []
BLACKLISTED
print ('Auto Join-For-Joiner')
print
MESSAGE = input('[~] Message : ')
BLACKLISTED_USERS = input('[~] Blacklisted Users: ') or 0
TOKEN = input('[~] Token : ')
for BLACKLISTED_USER in BLACKLISTED_USERS.split(", "):
BLACKLISTED_USER
if True:
BLACKLISTED += [int(BLACKLISTED_USER)]
BLACKLISTED
__j4j__ = {
'MESSAGE' : MESSAGE or '',
'BLACKLISTED_USERS' : BLACKLISTED or [],
'TOKEN' : TOKEN or os.environ['TOKEN']
}
class join:
class message:
messages = [
'j4j',
'j4j quick',
'j4j fast',
'j4j no bots',
'j4j quickly'
]
class channel:
name = 'j4j'
name
bot = commands.Bot(
command_prefix = 'j4j!',
self_bot = True
)
if True:
@join.bot.event
async def on_ready():
if True:
client.host.run()
client
print ('[~] Loaded Client, %s' % (join.bot.user))
print
if True:
if True:
while True:
for guild in join.bot.guilds:
for channel in guild.channels:
if join.channel.name in channel.name:
try:
await channel.send(
random.choice(
join.message.messages
)
)
if True:
print ('[@] Sent Message | %s' % (channel.name))
print
except:
if True:
print ('[!] Cannot Send Message | %s' % (channel.name))
print
if True:
await asyncio.sleep(7.5)
await asyncio.sleep(7.5)
@join.bot.event
async def on_message(message):
try:
if isinstance(message.channel, discord.channel.DMChannel):
if True:
if message.author.bot:
print ('[~] Bot Passed')
print
else:
if message.author.id not in __j4j__['BLACKLISTED_USERS']:
if message.author.id not in replit.db['dmed']:
if True:
print ('[~] Attempting To DM (%s)' % (message.author.id))
print
try:
if True:
response = await message.author.send(__j4j__['MESSAGE'])
response
if True:
replit.db['dmed'] += [message.author.id]
replit
except:
print('[!] Cannot DM')
print
else:
if True:
print('[~] Skipped Previously DMED User, %s' % (message.author.id))
print
else:
if True:
print('[~] Skipped Blacklisted User, %s' % (message.author.id))
print
except:
pass
if __name__ == '__main__':
join.bot.run(__j4j__['TOKEN'], bot = False)
join