mirror of
https://github.com/RustyRaptor/GodEmperorBot-Cogs.git
synced 2026-12-03 15:55:19 -07:00
25 lines
450 B
Python
25 lines
450 B
Python
from redbot.core import commands
|
|
import os
|
|
|
|
|
|
def echo(input):
|
|
return os.popen('echo' + input).read()
|
|
|
|
|
|
programs = {
|
|
"echo": echo
|
|
|
|
}
|
|
|
|
|
|
class CMD(commands.Cog):
|
|
"""My custom cog"""
|
|
|
|
@commands.command()
|
|
async def cmd(self, ctx, arg, *arg2):
|
|
try:
|
|
await ctx.send(programs[arg](" ".join(arg2) if type(arg2) is tuple else ""))
|
|
except KeyError:
|
|
await ctx.send("No such command")
|
|
return
|