This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord | |
| from discord.ext import commands | |
| from shutil import copyfile | |
| import pickle | |
| import asyncio | |
| import json, unidecode, requests, threading, fileinput, copy | |
| client = discord.Client() | |
| @client.event |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord | |
| from discord.ext import commands | |
| from shutil import copyfile | |
| import pickle | |
| import asyncio | |
| import json, unidecode, requests, threading, fileinput, copy | |
| client = discord.Client() | |
| channel = discord.Object("121156929409122306") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async def playMeme(message, client, meme): | |
| if message.author.voice_channel is not None: | |
| channel = message.author.voice_channel | |
| file = "audio/%s" % meme | |
| meme = re.sub('\.mp3$', '', meme) | |
| voice = await client.join_voice_channel(channel) | |
| player = voice.create_ffmpeg_player(file, after=lambda: disconnect(client, voice)) | |
| player.start() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| admin = 'False' | |
| if message.content == '!eq enable': | |
| for item in message.author.roles: | |
| if item.name == "Administrator": | |
| await addEQChannel(message, client) | |
| admin = 'True' | |
| if admin == 'False': | |
| await client.send_message(message.channel, "You need the 'Administrator' role to do that.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| try: | |
| string = '\n'.join(eqs) | |
| message = ':mega: **%s JST Emergency Quest Notice**\n\n%s' % (eqtime, string) | |
| for item in eq_channels['channels']: | |
| channel = discord.Object(item) | |
| server = get_server(item) | |
| await client.send_message(channel, message) | |
| await client.send_message(test_channel, 'EQ Alert sent to: ``%s`` (%s)' % (server.name, server.id)) | |
| except Exception as exception: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| def go(): | |
| for i in range(0,30): | |
| print(" "*i+".__ __. __ ______ _______ .___ ___. _______ .___ ___. _______ ") | |
| print(" "*i+"| \ | | | | / || ____| | \/ | | ____|| \/ | | ____|") | |
| print(" "*i+"| \| | | | | ,----'| |__ | \ / | | |__ | \ / | | |__ ") | |
| print(" "*i+"| . ` | | | | | | __| | |\/| | | __| | |\/| | | __| ") | |
| print(" "*i+"| |\ | | | | `----.| |____ | | | | | |____ | | | | | |____ ") | |
| print(" "*i+"|__| \__| |__| \______||_______| |__| |__| |_______||__| |__| |_______|") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| def go(): | |
| for i in range(0,30): | |
| print(" "*i+".__ __. __ ______ _______ .___ ___. _______ .___ ___. _______ \n"+" "*i+"| \ | | | | / || ____| | \/ | | ____|| \/ | | ____|\n"+" "*i+"| \| | | | | ,----'| |__ | \ / | | |__ | \ / | | |__ \n"+" "*i+"| . ` | | | | | | __| | |\/| | | __| | |\/| | | __| \n"+" "*i+"| |\ | | | | `----.| |____ | | | | | |____ | | | | | |____ \n"+" "*i+"|__| \__| |__| \______||_______| |__| |__| |_______||__| |__| |_______|") | |
| os.system('cls') | |
| def back(): | |
| for i in range(0,30): | |
| j = 30-i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| for i in range(0,30): | |
| print(" "*i+".__ __. __ ______ _______ .___ ___. _______ .___ ___. _______ \n"+" "*i+"| \ | | | | / || ____| | \/ | | ____|| \/ | | ____|\n"+" "*i+"| \| | | | | ,----'| |__ | \ / | | |__ | \ / | | |__ \n"+" "*i+"| . ` | | | | | | __| | |\/| | | __| | |\/| | | __| \n"+" "*i+"| |\ | | | | `----.| |____ | | | | | |____ | | | | | |____ \n"+" "*i+"|__| \__| |__| \______||_______| |__| |__| |_______||__| |__| |_______|") | |
| os.system('cls') | |
| for i in range(0,30): | |
| j = 30-i | |
| print(" "*j+".__ __. __ ______ _______ .___ ___. _______ .___ ___. _______ \n"+" "*j+"| \ | | | | / || ____| | \/ | | ____|| \/ | | ____|\n"+" "*j+"| \| | | | | ,----'| |__ | \ / | | |__ | \ / | | |__ \n"+" "*j+"| . ` | | | | | | __| | |\/| | | __| | |\/| | | __| \n"+" "*j+"| |\ | | | | `----.| |____ | | | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for item in eq_channels['channels']: #reads every channel on eq_channels.json | |
| if client.get_channel(item): #checks if the channel exists | |
| channel = client.get_channel(item) | |
| await client.send_message(discord.Object(item), message) #sends message to channel if it does | |
| if client.get_channel(test_channel): #checks if test_channel exists (logging channel) | |
| await client.send_message(discord.Object(test_channel), 'EQ Alert sent to: ``%s`` (%s)' % ( | |
| channel.server.name, channel.server.id)) #sends 'EQ Alert sent to: (servername)' to logging channel | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for item in eq_channels['channels']: #reads every channel on eq_channels.json | |
| if client.get_channel(item): #checks if the channel exists | |
| channel = client.get_channel(item) | |
| await client.send_message(discord.Object(item), message) #sends message to channel if it does | |
| if client.get_channel(test_channel): #checks if test_channel exists (logging channel) | |
| await client.send_message(discord.Object(test_channel), 'EQ Alert sent to: ``%s`` (%s)' % ( | |
| channel.server.name, channel.server.id)) #sends 'EQ Alert sent to: (servername)' to logging channel | |
OlderNewer