mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-24 03:54:20 +00:00
Try to logout
This commit is contained in:
parent
86b4d770cc
commit
07e2c1fedd
2 changed files with 4 additions and 1 deletions
1
bots.py
1
bots.py
|
@ -28,3 +28,4 @@ if __name__ == "__main__":
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
os.system("reset")
|
os.system("reset")
|
||||||
|
discord_telegram_pipe[0].send("stop")
|
||||||
|
|
|
@ -217,6 +217,9 @@ async def update_users_pipe(users_connection):
|
||||||
if msg == "get cv":
|
if msg == "get cv":
|
||||||
discord_members = list(client.get_server(config["Discord"]["server_id"]).members)
|
discord_members = list(client.get_server(config["Discord"]["server_id"]).members)
|
||||||
users_connection.send(discord_members)
|
users_connection.send(discord_members)
|
||||||
|
elif msg == "stop":
|
||||||
|
await client.logout()
|
||||||
|
exit(0)
|
||||||
elif msg.startswith("!"):
|
elif msg.startswith("!"):
|
||||||
data = msg.split(" ")
|
data = msg.split(" ")
|
||||||
if data[0] not in commands:
|
if data[0] not in commands:
|
||||||
|
@ -657,7 +660,6 @@ def process(users_connection=None):
|
||||||
client.on_error = on_error
|
client.on_error = on_error
|
||||||
loop.run_until_complete(client.login(config["Discord"]["bot_token"], bot=True))
|
loop.run_until_complete(client.login(config["Discord"]["bot_token"], bot=True))
|
||||||
loop.run_until_complete(client.connect())
|
loop.run_until_complete(client.connect())
|
||||||
loop.run_until_complete(client.logout())
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Reference in a new issue