Synced repo using 'sync_with_huggingface' Github Action
Browse files
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
import gradio_client as grc
|
| 3 |
import dotenv
|
| 4 |
import discord
|
|
|
|
| 5 |
import os
|
| 6 |
import threading
|
| 7 |
from threading import Event
|
|
@@ -15,7 +16,7 @@ DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
|
|
| 15 |
|
| 16 |
intents = discord.Intents.default()
|
| 17 |
intents.message_content = True
|
| 18 |
-
bot =
|
| 19 |
|
| 20 |
# limit command to channel_name
|
| 21 |
channel_name = "🤸🏻♀anime"
|
|
@@ -55,10 +56,7 @@ async def on_ready():
|
|
| 55 |
event.set()
|
| 56 |
|
| 57 |
|
| 58 |
-
@bot.hybrid_command(
|
| 59 |
-
name="ping",
|
| 60 |
-
description="ping"
|
| 61 |
-
)
|
| 62 |
async def ping(ctx):
|
| 63 |
await ctx.respond(f"{bot.latency*1000:.0f}ms")
|
| 64 |
|
|
|
|
| 2 |
import gradio_client as grc
|
| 3 |
import dotenv
|
| 4 |
import discord
|
| 5 |
+
from discord.ext import commands
|
| 6 |
import os
|
| 7 |
import threading
|
| 8 |
from threading import Event
|
|
|
|
| 16 |
|
| 17 |
intents = discord.Intents.default()
|
| 18 |
intents.message_content = True
|
| 19 |
+
bot = commands.Bot(command_prefix="/",intents=intents)
|
| 20 |
|
| 21 |
# limit command to channel_name
|
| 22 |
channel_name = "🤸🏻♀anime"
|
|
|
|
| 56 |
event.set()
|
| 57 |
|
| 58 |
|
| 59 |
+
@bot.hybrid_command(name="ping",description="ping")
|
|
|
|
|
|
|
|
|
|
| 60 |
async def ping(ctx):
|
| 61 |
await ctx.respond(f"{bot.latency*1000:.0f}ms")
|
| 62 |
|