Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import os
- import threading
- import subprocess
- import asyncio
- import CONFIG_YEET
- #import importlib
- from discord.ext import commands
- from discord.utils import get
- import youtube_dl
- import ffmpeg
- import logging
- import random
- #import consoles
- prefix = CONFIG_YEET.prefix
- token = CONFIG_YEET.token
- logging.info("bot token: {}".format(token))
- client = commands.Bot(command_prefix=CONFIG_YEET.prefix)
- listqueue = []
- radioqueue=os.listdir("/termux/After The Flash 7: Mirage OST")
- commandYEET=""
- botname = ""
- randomnum = 0
- @client.event
- async def on_ready():
- print("bot online")
- botname=client.user.id
- print(botname)
- @client.event
- async def on_message(message):
- commandYEET = message
- messageYEET = commandYEET
- author = messageYEET.author
- content = messageYEET.content
- authorid = author.id
- print(messageYEET)
- print("author name: {}\ncontent: {}".format(author.name,content))
- logchannel = message.channel
- if content =="<@309164174313914368>":
- await logchannel.send("meow {} why you ping me".format("<@"+str(authorid)+">"))
- if not messageYEET.author.id == botname:
- if message.guild == None or str(message.guild.id) == "387190332149727242":
- if content == "Creeper" :
- await logchannel.send("Aw man.")
- elif content == "Aw man":
- await logchannel.send("So we back in the mine.")
- elif content == "So we back in the mine":
- await logchannel.send("Got our pickaxe swinging from side to side.")
- elif content == "Got our pickaxe swinging from side to side":
- await logchannel.send("Side-side to side.")
- elif content == "Side-side to side":
- await logchannel.send("This task, a grueling one.")
- elif content == "This task, a grueling one":
- await logchannel.send("Hope to find some diamonds tonight, night, night.")
- elif content == "Hope to find some diamonds tonight, night, night":
- await logchannel.send("Diamonds tonight.")
- elif content == "Diamonds tonight":
- await logchannel.send("Heads up.")
- elif content =="Heads up":
- await logchannel.send("You hear a sound, turn around and look up.")
- elif content =="You hear a sound, turn around and look up":
- await logchannel.send("Total shock fills your body.")
- elif content =="Total shock fills your body":
- await logchannel.send("Oh, no, it's you again.")
- elif content =="Oh, no, it's you again":
- await logchannel.send("I can never forget those eyes, eyes, eyes.")
- elif content =="I can never forget those eyes, eyes, eyes":
- await logchannel.send("Eyes-eye-eyes.")
- elif content =="Eyes-eye-eyes":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again.")
- elif content =="The creeper's tryna steal all our stuff again":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("You grab your pick, shovel, and bolt again (Bolt again-gain).")
- elif content =="You grab your pick, shovel, and bolt again (Bolt again-gain)":
- await logchannel.send("And run, run until it's done, done.")
- elif content =="And run, run until it's done, done":
- await logchannel.send("Until the sun comes up in the morn'.")
- elif content =="Until the sun comes up in the morn'":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again (Stuff again-gain).")
- elif content =="The creeper's tryna steal all our stuff again (Stuff again-gain)":
- await logchannel.send("Just when you think you're safe.")
- elif content =="Just when you think you're safe":
- await logchannel.send("Overhear some hissing from right behind.")
- elif content =="Overhear some hissing from right behind":
- await logchannel.send("Right-right behind.")
- elif content =="Right-right behind":
- await logchannel.send("That's a nice life you have.")
- elif content =="That's a nice life you have":
- await logchannel.send("Shame it's gotta end at this time, time, time.")
- elif content =="Shame it's gotta end at this time, time, time":
- await logchannel.send("Time-time-time-time.")
- elif content =="Time-time-time-time":
- await logchannel.send("Blows up.")
- elif content =="Blows up":
- await logchannel.send("Then your health bar drops and you could use a one-up.")
- elif content =="Then your health bar drops and you could use a one-up":
- await logchannel.send("Get inside, don't be tardy.")
- elif content =="Get inside, don't be tardy":
- await logchannel.send("So, now you're stuck in there.")
- elif content =="So, now you're stuck in there":
- await logchannel.send("Half a heart is left, but don't die, die, die.")
- elif content =="Half a heart is left, but don't die, die, die":
- await logchannel.send("Die-die-die.")
- elif content =="Die-die-die":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again.")
- elif content =="The creeper's tryna steal all our stuff again":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("You grab your pick, shovel, and bolt again (Bolt again-gain).")
- elif content =="You grab your pick, shovel, and bolt again (Bolt again-gain)":
- await logchannel.send("And run, run until it's done, done.")
- elif content =="And run, run until it's done, done":
- await logchannel.send("Until the sun comes up in the morn'.")
- elif content =="Until the sun comes up in the morn'":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again.")
- elif content =="The creeper's tryna steal all our stuff again":
- await logchannel.send("(Creepers, you're mine, haha).")
- elif content =="(Creepers, you're mine, haha)":
- await logchannel.send("Dig up diamonds and craft those diamonds.")
- elif content =="Dig up diamonds and craft those diamonds":
- await logchannel.send("And make some armor, get it, baby.")
- elif content =="And make some armor, get it, baby":
- await logchannel.send("Go and forge that like you so MLG pro.")
- elif content =="Go and forge that like you so MLG pro":
- await logchannel.send("The sword's made of diamonds, so come at me, bro, huh.")
- elif content =="The sword's made of diamonds, so come at me, bro, huh":
- await logchannel.send("Training in your room under the torchlight.")
- elif content =="Training in your room under the torchlight":
- await logchannel.send("Hone that form to get you ready for the big fight.")
- elif content =="Hone that form to get you ready for the big fight":
- await logchannel.send("Every single day and the whole night.")
- elif content =="Every single day and the whole night":
- await logchannel.send("Creeper's out prowlin', hoo, alright.")
- elif content =="Creeper's out prowlin', hoo, alright":
- await logchannel.send("Look at me, look at you.")
- elif content =="Look at me, look at you":
- await logchannel.send("Take my revenge, that's what I'm gonna do.")
- elif content =="Take my revenge, that's what I'm gonna do":
- await logchannel.send("I'm a warrior, baby, what else is new?.")
- elif content =="I'm a warrior, baby, what else is new?":
- await logchannel.send("And my blade's gonna tear through you, bring it.")
- elif content =="And my blade's gonna tear through you, bring it":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again.")
- elif content =="The creeper's tryna steal all our stuff again":
- await logchannel.send("(Gather your stuff, yeah, let's take back the world).")
- elif content =="(Gather your stuff, yeah, let's take back the world)":
- await logchannel.send("Yeah, baby, tonight (Haha).")
- elif content =="Yeah, baby, tonight (Haha)":
- await logchannel.send("Grab your sword, armor and go (It's on).")
- elif content =="Grab your sword, armor and go (It's on)":
- await logchannel.send("Take your revenge (Woo), oh-oh, oh-oh.")
- elif content =="Take your revenge (Woo), oh-oh, oh-oh":
- await logchannel.send("So fight, fight, like it's the last, last night.")
- elif content =="So fight, fight, like it's the last, last night":
- await logchannel.send("Of your life, life, show them your bite (Woo).")
- elif content =="Of your life, life, show them your bite (Woo)":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("The creeper's tryna steal all our stuff again.")
- elif content =="The creeper's tryna steal all our stuff again":
- await logchannel.send("'Cause, baby, tonight.")
- elif content =="'Cause, baby, tonight":
- await logchannel.send("You grab your pick, shovel and bolt again (Bolt again-gain, woo).")
- elif content =="You grab your pick, shovel and bolt again (Bolt again-gain, woo)":
- await logchannel.send("And run, run until it's done, done.")
- elif content =="And run, run until it's done, done":
- await logchannel.send("Until the sun comes up in the morn'.")
- elif content =="Until the sun comes up in the morn'":
- await logchannel.send("'Cause, baby, tonight (Come on, swing your sword up high).")
- elif content =="'Cause, baby, tonight (Come on, swing your sword up high)":
- await logchannel.send("The creeper's tryna steal all our stuff again (Come on, jab your sword down low).")
- elif content =="The creeper's tryna steal all our stuff again (Come on, jab your sword down low)":
- await logchannel.send("(Woo).")
- elif content =="Country road":
- await logchannel.send("Take me home.")
- elif content =="Take me home":
- await logchannel.send("To the place i belong.")
- elif content =="To the place i belong":
- await logchannel.send("*DEEP INHALE*")
- await asyncio.sleep(1)
- await logchannel.send("WEST VIRGINIA.")
- elif content =="West Virginia":
- await logchannel.send("Mountain mama.")
- if not message.guild == None:
- print("avatar url: {}".format(message.guild.get_member(authorid).avatar_url))
- await client.process_commands(messageYEET)
- @client.group()
- async def cogs(ctx):
- if ctx.invoked_subcommand is None:
- await ctx.send('Invalid cogs command passed...')
- @cogs.command()
- async def load(ctx,*,cogs):
- client.load_extension("cogs.{}".format(cogs))
- @cogs.command()
- async def unload(ctx,*,cogs):
- client.unload_extension("cogs.{}".format(cogs))
- @commands.group(aliases=["root","fullp"])
- async def full_permission(ctx):
- if ctx.invoked_subcommand is None:
- await ctx.send("Invalid full_permission command passed...")
- elif not str(ctxauthor.id) == CONFIG_YEET.full_permission_guy:
- await ctx.send("you can't use this command :(")
- return
- @full_permission.command(pass_context=True, aliases=["file","fe"])
- async def send_file(ctx,path,*,filename):
- await ctx.send(file=discord.File(str(path)+"/"+str(filename)))
- @commands.group()
- async def music(ctx):
- if ctx.invoked_subcommand is None:
- await ctx.send('Invalid music command passed...')
- @music.command(pass_context=True)
- async def join(ctx):
- channelvc = ctxmessage.author.voice.channel
- await channelvc.connect()
- @music.command(pass_context=True)
- async def test_radio(ctx,path,*,file):
- await ctxmessage.author.voice.channel.connect()
- ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio(radioqueue[randomnum],executable='ffmpeg',pipe=False,before_options=None,options=None),1),after=None)
- @music.command(pass_context=True)
- async def playfromyoutube(ctx,message,*,name):
- os.system("youtube-dl -x --audio-format mp3 --audio-quality 0 -o '/YOUTUBE_DOWNLOAD/{}.%(ext)s' '{}'".format(str(name),str(message) ) )
- ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio("/YOUTUBE_DOWNLOAD/"+name+".mp3", executable='ffmpeg',pipe=False,before_options=None,options=None),1),after=None)
- @music.command(pass_context=True)
- async def play(ctx,path,*,file):
- if str(file) == "meme1.mp3":
- ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio("{}/{}".format(str(path) , str(file) ), executable='ffmpeg',pipe=False,before_options=None,options=None),5),after=None)
- else:
- ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCMAudio("{}/{}".format(str(path),str(file)),executable='ffmpeg',pipe=False,before_options=None,options=None),1),after=None)
- await ctx.send("{}/{}".format(str(path),str(file) ) )
- @music.command(pass_context=True)
- async def queue(ctx,message):
- listqueue.append(str(message))
- @music.command(pass_context=True)
- async def queuelist(ctx):
- await ctx.send(str(listqueue))
- @commands.command(pass_context=True, aliases=['j',"joi"])
- async def rewrite_music_join(ctx):
- global voice
- channelvc = ctx.message.author.voice.channel
- voice = get(client.voice_clients,guild=ctx.guild)
- if voice and voice.is_connected():
- await voice.move_To(channelvc)
- else:
- voice = await channelvc.connect()
- @commands.command(pass_context=True, aliases=['l','lea'])
- async def rewrite_music_leave(ctx):
- channelvc = ctx.message.author.voice.channel
- voice = get(client.voice_clients,guild=ctx.guild)
- if voice and voice.is_connected():
- await voice.disconnect()
- client.run(token,bot=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement