Closed lipepeixoto closed 1 year ago
Me neither, since
After all, if there is no concrete error with mcipc
, you're in the wrong place here.
I do not offer support for arbitrary user code here.
PS: Also mcipc.query.client.Client
has no method command()
.
I can't understand what I did wrong. :(
import discord import mcipc.query import asyncio import time from discord.ext import commands, tasks from key import token
intents = discord.Intents.default() intents.members = True client = commands.Bot(command_prefix='!', intents=intents) TOKEN = token.get("TOKEN")
@client.event async def on_ready(): print(f'{client.user} está online!')
async def update_status(channel1, channel2): while True: try: host, port = "###.enxada.host", ##### with mcipc.query.Client(host, port) as client: status = client.full_stat()
@client.command() async def status(ctx): await ctx.send("Adicionado Status do servidor")
@client.command() async def ping(ctx): await ctx.send('Pong! {0}'.format(round(bot.latency, 1)))
client.run(TOKEN)