member specific command added
This commit is contained in:
1 parent
a8afeb40ac
commit
a0dbe27884
3 files changed
+26
No files matched your search
@@ -8,6 +8,7 @@ import asyncio
|
|||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
from collections import defaultdict, deque
|
from collections import defaultdict, deque
|
||||||
|
# pyrefly: ignore [missing-import]
|
||||||
from openai import AsyncOpenAI
|
from openai import AsyncOpenAI
|
||||||
|
|
||||||
#only last 12 messages on discord will be fed into the ai's memory
|
#only last 12 messages on discord will be fed into the ai's memory
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
from datetime import timedelta
|
||||||
|
from aiohttp import client_exceptions
|
||||||
import discord
|
import discord
|
||||||
from aiohttp import client_exceptions
|
from aiohttp import client_exceptions
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
@@ -66,6 +68,25 @@ class General(commands.Cog):
|
|||||||
return
|
return
|
||||||
await ctx.channel.purge(limit=amount + 1)
|
await ctx.channel.purge(limit=amount + 1)
|
||||||
|
|
||||||
|
#member specific command, priviliged
|
||||||
|
@commands.command()
|
||||||
|
async def ferox(self, ctx, duration: str):
|
||||||
|
if ctx.author.id != int(os.getenv("MELLO")):
|
||||||
|
return await ctx.reply("you are not her bro")
|
||||||
|
|
||||||
|
units = {
|
||||||
|
"m": timedelta(minutes=1),
|
||||||
|
"h": timedelta(hours=1),
|
||||||
|
"d": timedelta(days=1),
|
||||||
|
"w": timedelta(weeks=1),
|
||||||
|
}
|
||||||
|
|
||||||
|
amount = int(duration[:-1])
|
||||||
|
delta = amount * units[duration[-1].lower()]
|
||||||
|
ferox = ctx.guild.get_member(int(os.getenv("FEROX")))
|
||||||
|
await ferox.timeout(discord.utils.utcnow() + delta)
|
||||||
|
await ctx.reply(f"muted ferox for {duration}, she knows the best")
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
async def ban(self, ctx, *, reason=None):
|
async def ban(self, ctx, *, reason=None):
|
||||||
if ctx.author.id != int(os.getenv('OWNER_ID')):
|
if ctx.author.id != int(os.getenv('OWNER_ID')):
|
||||||
|
|||||||
@@ -19,3 +19,7 @@ STRINOVA_STAT_CHANNEL_ID="yo strinova stat channel here"
|
|||||||
OWNER_ID="your discord servers owner id here"
|
OWNER_ID="your discord servers owner id here"
|
||||||
|
|
||||||
DEEPSEEK_API=lol you thought
|
DEEPSEEK_API=lol you thought
|
||||||
|
|
||||||
|
#mis ids member speicific stuff
|
||||||
|
MELLO=""
|
||||||
|
FEROX=""
|
||||||
Reference in new issue
Block a user