Ejemplo n.º 1
0
async def waifu(ctx):
    rawargs = ctx.content.replace(f'{pre}waifu', '')
    args = rawargs.split()
    if args != []:
        if args[0] == 'random':
            rwaifu = random.choice(os.listdir(waifus))
            embed = guilded.Embed(title=f'And your waifu is gonna be...', description=f'Waifu code:{rwaifu}! (ignore file extension)')
            waifurl = await upload_file(f'{waifus}{rwaifu}', 'ContentMedia')
            embed.set_image(waifurl)
            await ctx.send(embed=embed) 

        elif args[0]+'.png' in os.listdir(waifus) or args[0]+'.jpeg' in os.listdir(waifus):
            if args[0]+'.png' in os.listdir(waifus):
                waifu = args[0]+'.png' 
                embed = guilded.Embed(title=f'Waifu requested: {args[0]}')
                waifurl = await upload_file(f'{waifus}{args[0]}.png', 'ContentMedia')
                embed.set_image(waifurl)
                await ctx.send(embed=embed) 
#                await ctx.send(f"Here's your requested waifu (no. {args[0]}): ", file= f'assets\\waifus\\images\\{args[0]}+.png')
            elif args[0]+'.jpeg' in os.listdir(waifus):
                waifu = args[0]+'.jpeg'
                embed = guilded.Embed(title=f'Waifu requested: {args[0]}')
                waifurl = await upload_file(f'{waifus}{args[0]}.jpeg', 'ContentMedia')
                embed.set_image(waifurl)
                await ctx.send(embed=embed)      
#                await ctx.send(f"Here's your requested waifu (no. {args[0]}): ", file= f'assets\\waifus\\images\\{args[0]}+.jpeg')                  
        else:
            embed = guilded.Embed(title='Oofus', description='Stated waifu code does not work... sed')
            await ctx.send(embed=embed)
Ejemplo n.º 2
0
async def avatar(ctx, member: guilded.User=None):
    if not member:
        user = ctx.author
        embed = guilded.Embed(title=f"{user.name}'s avatar")
        embed.set_image(user.avatar_url.replace('https://img.guildedcdn.com/','https://s3-us-west-2.amazonaws.com/www.guilded.gg/'))
        await ctx.send(embed=embed)
    elif member:
        try:
            user = await bot.fetch_user(member)
            embed = guilded.Embed(title=f"{user.name}'s avatar")
            embed.set_image(user.avatar_url.replace('https://img.guildedcdn.com/','https://s3-us-west-2.amazonaws.com/www.guilded.gg/'))
            await ctx.send(embed=embed)
        except Exception as e:
            await err(ctx)
            print(e)
Ejemplo n.º 3
0
async def urban(ctx):
    word = ctx.content.replace(f'{pre}urban','')
    if word:
        try:
            urband = ud.define(word)[0]
            embed = guilded.Embed(title = urband.word, description = urband.definition[0:2045]+'...')
            embed.set_thumbnail(url = 'https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/UD_logo-01.svg/1200px-UD_logo-01.svg.png')
            embed.add_field(name = 'Usage', value= str(urband.example))
            await ctx.send(embed=embed)
        except IndexError:
            embed = guilded.Embed(title='Oofus', description='Could not find the meaning...')
            await ctx.send(embed=embed)
    else:
        embed = guilded.Embed(title='wtf?', description='meaning of what?')
        await ctx.send(embed=embed)
Ejemplo n.º 4
0
async def play(ctx):
    if state != 1:
        songname = ctx.content.replace(f'{pre}play', '')
        embed = guilded.Embed(
            title="Muzach", description=f"Yay les go playing ur spicy muzach")
        link = str(yts.searchVid(songname))
        vid = YouTube(link)
        title = lu.characterRemover(vid.title)
        embed.add_field(name=f"Searched for, {songname}",
                        value=f"Got song, {title}, from YT with link, {link}")
        embed.set_thumbnail(
            ctx.author.avatar_url.replace(
                'https://img.guildedcdn.com/',
                'https://s3-us-west-2.amazonaws.com/www.guilded.gg/'))
        await ctx.send(embed=embed)
        await playAudio.playMeg(link, vid)
    else:
        embed = guilded.Embed(title="Something is playing currently",
                              description=f"Wait for your turn pls")
        embed.set_thumbnail(
            ctx.author.avatar_url.replace(
                'https://img.guildedcdn.com/',
                'https://s3-us-west-2.amazonaws.com/www.guilded.gg/'))
        await ctx.send(embed=embed)
Ejemplo n.º 5
0
async def userinfo(ctx, member: guilded.User=None):
 
  if not member:
    member = ctx.author
  else:
    member = await bot.fetch_user(member)
  
  try:
    about = member.about.get('tagLine')
  except:
    try:
      about = member.about.get('bio')
    except:
      about = None
  embed = guilded.Embed(title=f"{member.name} info",
                        description=f'Name: {member.name}\n ID: {member.id}\n About: {about}\n Avatar url: [click here]({member.avatar_url})\nAccount Created: {member.created_at.strftime("%d/%m/%Y")}\n Last online: {member.last_online.strftime("%d/%m/%Y")}')
  embed.set_thumbnail(member.avatar_url.replace('https://img.guildedcdn.com/','https://s3-us-west-2.amazonaws.com/www.guilded.gg/'))
  await ctx.send(embed=embed)
Ejemplo n.º 6
0
async def err(ctx):
    embed = guilded.Embed(title='Oofus', description='Some error occured... \n Please notify bot creator! \n Your help will be appreciated!')
    await ctx.send(embed = embed)
Ejemplo n.º 7
0
async def ping(ctx):
    embed = guilded.Embed(title='Pong!')
    await ctx.send(embed=embed)
Ejemplo n.º 8
0
async def points(ctx):
    points = ledgyboi[ctx.author.name]
    embed = guilded.Embed(title=f"{ctx.author.name}'s points!", description=f"You currently have... \n {points} points!")
    await ctx.send(embed=embed)
Ejemplo n.º 9
0
async def choose(ctx):
    choices = ctx.content.replace(f'{pre}choose','')
    rchoices = choices.split()
    embed = guilded.Embed(title="I choose...", description=f"{random.choice(rchoices)}!")
    await ctx.send(embed=embed)