27 lines
876 B
Python
27 lines
876 B
Python
|
import next
|
||
|
|
||
|
from next.ext import commands
|
||
|
|
||
|
class Client(commands.CommandsClient):
|
||
|
async def get_prefix(self, message: next.Message):
|
||
|
return "!"
|
||
|
|
||
|
async def on_ready(self):
|
||
|
print(f"Authorized as {self.user.name}#{self.user.discriminator}")
|
||
|
try:
|
||
|
await self.edit_status(presence=next.PresenceType.focus,
|
||
|
text="Watching friend requests...")
|
||
|
except Exception as e:
|
||
|
print(f"Unable to edit status. ({e})")
|
||
|
|
||
|
@commands.command()
|
||
|
async def ping(self, ctx: commands.Context):
|
||
|
"""Returns \"Pong.\""""
|
||
|
message = "Pong."
|
||
|
await ctx.send(message)
|
||
|
|
||
|
@commands.command()
|
||
|
async def say(self, ctx: commands.Context, *args):
|
||
|
"""Returns user input by joining user arguments with spaces"""
|
||
|
message = ' '.join(args)
|
||
|
await ctx.send(message)
|