initial commit
This commit is contained in:
24
dsNut.py
Normal file
24
dsNut.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from discord.ext import commands
|
||||
|
||||
from nut_interface import NUT
|
||||
|
||||
class Nut(commands.Cog):
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.nut = None
|
||||
|
||||
@commands.Cog.listener()
|
||||
async def on_ready(self):
|
||||
logging.info("Nut cog ready")
|
||||
self.nut = NUT(login="admin", password="stereo")
|
||||
|
||||
@commands.command(name="ping")
|
||||
async def ping(self, ctx):
|
||||
await ctx.send("pang")
|
||||
|
||||
@commands.command(name="info")
|
||||
async def current_info(self, ctx):
|
||||
await ctx.send(self.nut.get_info())
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Nut(bot))
|
||||
Reference in New Issue
Block a user