Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Written By TheIotLord
- import discord
- from discord.ext import commands
- ibot = commands.Bot(command_prefix = '.')
- ibot.remove_command('help')
- @ibot.event
- async def on_ready():
- print('Online.')
- @ibot.command()
- async def ping(ctx, host):
- hostname = "{}".format(host)
- response = os.system('ping ' + hostname)
- if response == 0:
- await ctx.send('```Status: ' + hostname + ' Online```')
- else:
- await ctx.send('```Status: ' + hostname + ' Offline```')
- @ibot.command(pass_context=True)
- async def help(ctx):
- author = ctx.message.author
- embed = discord.Embed(
- colour = discord.Colour.blue()
- )
- embed.set_thumbnail(url=author.avatar_url)
- embed.set_footer(icon_url=ctx.author.avatar_url)
- embed.add_field(name='.help', value='Shows this menu', inline=False)
- embed.add_field(name='.ping', value='Checks connections status', inline=False)
- await ctx.send(embed=embed)
- ibot.run('YOURTOKENHERE')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement