mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Remove discordbot on init
This commit is contained in:
parent
c3a562590a
commit
ff42f4195b
@ -78,27 +78,27 @@ class Titan(discord.Client):
|
|||||||
self.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None))
|
self.botsDiscordPw = BotsDiscordPw(self.user.id, config.get("bots-discord-pw-token", None))
|
||||||
await self.postStats()
|
await self.postStats()
|
||||||
|
|
||||||
if "no-init" not in sys.argv:
|
# if "no-init" not in sys.argv:
|
||||||
for server in self.servers:
|
# for server in self.servers:
|
||||||
await self.database.update_guild(server)
|
# await self.database.update_guild(server)
|
||||||
if server.large:
|
# if server.large:
|
||||||
await self.request_offline_members(server)
|
# await self.request_offline_members(server)
|
||||||
if server.me.server_permissions.ban_members:
|
# if server.me.server_permissions.ban_members:
|
||||||
server_bans = await self.get_bans(server)
|
# server_bans = await self.get_bans(server)
|
||||||
else:
|
# else:
|
||||||
server_bans = []
|
# server_bans = []
|
||||||
for member in server.members:
|
# for member in server.members:
|
||||||
banned = member.id in [u.id for u in server_bans]
|
# banned = member.id in [u.id for u in server_bans]
|
||||||
await self.database.update_guild_member(
|
# await self.database.update_guild_member(
|
||||||
member,
|
# member,
|
||||||
True,
|
# True,
|
||||||
banned
|
# banned
|
||||||
)
|
# )
|
||||||
await self.database.flag_unactive_guild_members(server.id, server.members)
|
# await self.database.flag_unactive_guild_members(server.id, server.members)
|
||||||
await self.database.flag_unactive_bans(server.id, server_bans)
|
# await self.database.flag_unactive_bans(server.id, server_bans)
|
||||||
await self.database.remove_unused_guilds(self.servers)
|
# await self.database.remove_unused_guilds(self.servers)
|
||||||
else:
|
# else:
|
||||||
print("Skipping indexing server due to no-init flag")
|
# print("Skipping indexing server due to no-init flag")
|
||||||
|
|
||||||
async def on_message(self, message):
|
async def on_message(self, message):
|
||||||
await self.database.push_message(message)
|
await self.database.push_message(message)
|
||||||
|
Loading…
Reference in New Issue
Block a user