#Tellinq Moderation Bot Discussion

335 messages · Page 1 of 1 (latest)

valid seal
#

https://github.com/Tellinq/Discord-Moderation-Bot @near girder @floral plume @coral cypress @valid seal @loud pasture if you (still (if you implied wanting to help)) want to be main contributors lmk

This is just gonna be the repo I use. I'll add contribution guidelines and feature requests via the Issues page

so @tender snow

GitHub

A flexible and robust Discord bot intended to maximize Discord's build in moderation tools while keeping elegant command-card interfaces and proper privlege management - GitHub - Tellinq/Di...

#

desired features
automod interaction
tellinq point system (punishment acculmation)
logging

#

starting with automod would be good

floral plume
#

would be cool to do something with reactions

#

especially moderating spammy / inappropriate reacting by users

#

tellinq also said there would be a nom command for june

valid seal
floral plume
#

okay buddy

valid seal
tender snow
near girder
#

can i suggest libraries that i’ve had good experience with?

tender snow
#

I did discuss with June back when she was doing her own thing with mod logs how they should look

and she so far had the closest that I most preferred

#

I wish I remembers what they looked like

#

but they were to the tea what I was wanting

near girder
#

it had pagination

valid seal
#

i want to actively contribute

near girder
#

so you could click a button and go to the next page of modlogs

tender snow
#

honestly this project is so long overdue

#

I promised Couleur I would do this

#

but never had time

#

but I can't do this alone anyways

valid seal
tender snow
#

I think the order of attack we need is to implement what Carlbot outright cannot do

valid seal
#

wrapper around automod itself in a nutshell

tender snow
#

and then slowly make Carlbot obselete

#

and Dyno for that matter too

valid seal
tender snow
#

yea

coral cypress
#

and make sure it's not super hardcoded

#

config file with no actual web-based interface is fine

floral plume
#

make discord obsolete; make our own messaging platform

tender snow
#

my idea with automod actions is that if the bot has it's own automod actions

it should be based off the built in Discord automod rules on top

so say if someone flagged for commonly flagged rules

that would trigger the bot to do something

tender snow
#

is for scammers

#

to auto kick

#

but only for a thorough automod rule

#

say for what I have right now

#

this would not work well

#

but it should be an option

valid seal
#

this what we want rn

tender snow
#

yeah

near girder
#
GitHub

A Python wrapper for the Discord API forked from discord.py - GitHub - nextcord/nextcord: A Python wrapper for the Discord API forked from discord.py

GitHub

An API wrapper for Discord written in Python. Contribute to DisnakeDev/disnake development by creating an account on GitHub.

GitHub

A Discord API wrapper for Python and asyncio built on good intentions. - GitHub - hikari-py/hikari: A Discord API wrapper for Python and asyncio built on good intentions.

tender snow
#

Automod is like

near girder
#

wtf

tender snow
#

top priority

#

we just don't have a good system with automod rn

valid seal
tender snow
#

punishments we can work with

#

like

#

./moderation timeout already exists

#

it's a solid system for what we need

#

the only thing not solid is discussing severity

#

there's really no streamlined system

#

and mostly covered by biased decisions

near girder
#

disnake or nextcord are both good choices

tender snow
#

I think @coral cypress DMed me something similar to this concern

valid seal
tender snow
coral cypress
#

point systems will have flaws because infractions are a spectrum

tender snow
valid seal
#

should i delete mine?

#

because i want one where people can test bots and shit

tender snow
#

like other bots?

valid seal
tender snow
#

or just a dev verison of ours

#

sure

#

Keep yours

valid seal
#

👍

tender snow
valid seal
#

i want a server as a playground for the bot's forks

valid seal
tender snow
#

ye

tender snow
#

hold one we should name our servers to be a bit more consistent

#

Moderation Bot (Forks)
Moderation Bot (Development)

valid seal
#

done

tender snow
#

Done

#

alr now I need to invite you guys

#

drop in your github usernames

near girder
coral cypress
#

thqrn

loud pasture
#

lemme finish my homework

#

ill join the conversation soon

tender snow
#

alr june frost and aetopia just invited you all

#

should receive an email

valid seal
near girder
tender snow
#

Did one... SKID?

#

this isnt new

#

it's been a thing for ages

near girder
#

both bad

tender snow
#

it's carlbot using one of those?

near girder
#

carlbot used pycord

#

it’s a mess

valid seal
#
ERROR 'dark' isn't installed correctly.
Removing older version (3.11.2).
'dark' was uninstalled.
Installing 'dark' (3.11.2) [64bit] from main bucket
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
URL https://raw.githubusercontent.com/ScoopInstaller/Binary/master/dark/dark-3.11.2.zip is not valid

????

tender snow
#

btw just so you know my expectations for how commit contributions go is that I don't bulk scope PRs

#

I prefer them to be split as much as possible

#

so say like if you had two features and a bug fix

#

split them

#

just so if one thing goes south

#

it doesn't have to affect the rest

valid seal
#

weird dns issue

tender snow
#

it's not a big deal during the live development phase

tender snow
valid seal
#

so like branches

tender snow
#

it'll matter

#

yea

#

it's basically what I do with CB

#

we are branch focused

#

just the difference here is that contributors have branch access on the main repo

#

and can use that if they wish

#

or they can just fork

#

and that's basically their own scope

valid seal
#

i can't fork the repo lmao since i am a contributor

loud pasture
#

should we create an org

tender snow
#

we could

#

if you guys think if it's a good idea

coral cypress
#

why not group it under ctt?

tender snow
#

I was intending on using this for the CB server too

coral cypress
#

or should it be a more independent bot

#

ah

tender snow
#

so idk if it should be CTT specific

#

other than that

#

I don't know if it'll be used on other servers

coral cypress
#

make it an orqanization

#

spelling intentional

valid seal
#

👍

tender snow
#

Orqanization

#

the new name

#

reakl

#

❓ 1

#

warning

#

i am very dependabot lurking

valid seal
#

@tender snow HOLY FUCK NO

#

@near girder

#

not installing msvc for this

near girder
#

it’s because of the python version iirc

valid seal
#

oh wait i am using 3.11.2

valid seal
near girder
#

why not run it locally if you’re just testing it

#

you could do oracle free tier maybe

valid seal
valid seal
#

doing bot testing here

valid seal
#
@bot.slash_command()
async def timeout(interaction: Interaction): pass

@timeout.subcommand("days")
async def timeout_days(interaction: Interaction, member: Member, reason: str, days: int):
    if (days in range(1, 30)):
        await member.timeout(timeout=timedelta(days=days), reason=reason)
        await interaction.send(f"{member.global_name} has been timed out for {days} day(s).")
    else:
        await interaction.send("You can timeout a member for 1 ~ 30 days.")

@timeout.subcommand("weeks")
async def timeout_month(interaction: Interaction, member: Member, reason: str, weeks: int):
    if (weeks in range(1, 5)):
        await member.timeout(timeout=timedelta(weeks=weeks), reason=reason)
        await interaction.send(f"{member.global_name} has been timed out for {weeks} week(s).")
    else:
        await interaction.send("You can timeout a member for 1 ~ 4 weeks.")

@timeout.subcommand("month")
async def timeout_month(interaction: Interaction, member: Member, reason: str):
    await member.timeout(timeout=timedelta(weeks=4), reason=reason)
    await interaction.send(f"{member.global_name} has been timed out for a month.")

@timeout.subcommand("remove")
async def timeout_remove(interaction: Interaction, member: Member, reason: str):
    await member.timeout(None, reason=reason)
    await interaction.send(f"Removed timeout for {member.global_name}.")
#

added timeout commands

#

syntax:
/timeout <duration> <reason> <duration in int>

little sundial
#

can we make it modular or something

#

with a separate file for each command

near girder
#

yes

valid seal
humble flower
#

is this about turning tellinq into a bot

valid seal
humble flower
#

make tellinq into a bot

valid seal
valid seal
#
from nextcord.ext import commands
from nextcord import Interaction, Member
from datetime import timedelta
bot = commands.Bot() <- How do I share this amongst all of my fuckin files for godsake.

@bot.slash_command()
async def timeout(interaction: Interaction): pass   

@timeout.subcommand("days")
async def timeout_days(interaction: Interaction, member: Member, reason: str, days: int):
    if (days in range(1, 30)):
        await member.timeout(timeout=timedelta(days=days), reason=reason)
        await interaction.send(f"{member.global_name} has been timed out for {days} day(s).")
    else:
        await interaction.send("You can timeout a member for 1 ~ 30 days.")

@timeout.subcommand("weeks")
async def timeout_month(interaction: Interaction, member: Member, reason: str, weeks: int):
    if (weeks in range(1, 5)):
        await member.timeout(timeout=timedelta(weeks=weeks), reason=reason)
        await interaction.send(f"{member.global_name} has been timed out for {weeks} week(s).")
    else:
        await interaction.send("You can timeout a member for 1 ~ 4 weeks.")

@timeout.subcommand("month")
async def timeout_month(interaction: Interaction, member: Member, reason: str):
    await member.timeout(timeout=timedelta(weeks=4), reason=reason)
    await interaction.send(f"{member.global_name} has been timed out for a month.")

@timeout.subcommand("remove")
async def timeout_remove(interaction: Interaction, member: Member, reason: str):
    await member.timeout(None, reason=reason)
    await interaction.send(f"Removed timeout for {member.global_name}.")

bot.run("")
valid seal
valid seal
#
import nextcord
from nextcord import Interaction, Member
from datetime import timedelta
from nextcord.ext.commands import Cog, Bot

class Timeout(Cog):
    def __init__(self, bot: Bot):
        self.bot = bot

    @nextcord.slash_command()
    async def timeout(self, interaction: Interaction): pass

    @timeout.subcommand("days")
    async def timeout_days(self, interaction: Interaction, member: Member, reason: str, days: int):
        if (days in range(1, 30)):
            await member.timeout(timeout=timedelta(days=days), reason=reason)
            await interaction.send(f"{member.global_name} has been timed out for {days} day(s).")
        else:
            await interaction.send("You can timeout a member for 1 ~ 30 days.")

    @timeout.subcommand("weeks")
    async def timeout_month(self, interaction: Interaction, member: Member, reason: str, weeks: int):
        if (weeks in range(1, 5)):
            await member.timeout(timeout=timedelta(weeks=weeks), reason=reason)
            await interaction.send(f"{member.global_name} has been timed out for {weeks} week(s).")
        else:
            await interaction.send("You can timeout a member for 1 ~ 4 weeks.")

    @timeout.subcommand("month")
    async def timeout_month(self, interaction: Interaction, member: Member, reason: str):
        await member.timeout(timeout=timedelta(weeks=4), reason=reason)
        await interaction.send(f"{member.global_name} has been timed out for a month.")

    @timeout.subcommand("remove")
    async def timeout_remove(self, interaction: Interaction, member: Member, reason: str):
        await member.timeout(None, reason=reason)
        await interaction.send(f"Removed timeout for {member.global_name}.")
valid seal
#

If there is any exception the error is dumped out by the bot.
implementing a logger would be optimal.

#

i might add role filtering the future but rn I want tellinq to add a license to the repo

#

@midnight wolf new mod bot incoming sinistercontent

valid seal
#

well atleast my implementation atm

floral plume
#

/strike

midnight wolf
#

trojan horse to turn ctt in cb advertisement

floral plume
#

can we make it ban all people with french role

floral plume
#

is it like a technical limitation

#

@valid seal why do i have to verify by phone

valid seal
floral plume
#

still asks for phone ver

valid seal
#

wait

valid seal
floral plume
#

works

#

i would have added my number a long time ago but my acc is bugged and doesn't work

near girder
#

@valid seal

valid seal
near girder
#

too tired to do more rn but

valid seal
#

wdym

near girder
valid seal
#

i left automod unfinished since i need to understand how to interact with it through nextcord

valid seal
valid seal
#

aren't cogs supported out of the box?

near girder
#

because then you dont have to import all of them

valid seal
valid seal
#

because this is very much not telling me what its trying to do

#

(seriously this is some bad documentation in my opinion)

#

wtf is the organization

near girder
#

ermmm i think maybe disnake might be the better choice now................

near girder
#

better docs

valid seal
near girder
#

barealy

#

barely

valid seal
#

or i just replace names and such

near girder
#

theyre quite similar so yeah

#

itd just be replacing names

floral plume
#

better switch while you still can

near girder
near girder
#

(birthday tek)

floral plume
#

it's

#

the 13th

near girder
#

i know

#

but technically

#

its ur bday week

floral plume
#

it's midterms week

near girder
valid seal
#

just porting the code over

little sundial
#

sorry i just woke ke up i couldn't help

near girder
little sundial
near girder
#

everyone say happy birthday tek

little sundial
#

happy day of the birtg cake

little sundial
#

i mean take

#

tek

floral plume
#

thanks

valid seal
#
 File "c:\Users\User\Documents\GitHub\Discord-Moderation-Bot\src\main.py", line 11, in <module>
    @bot.slash_command()
     ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\interaction_bot_base.py", line 560, in decorator
    result = slash_command(
             ^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\slash_core.py", line 825, in decorator
    return InvokableSlashCommand(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\slash_core.py", line 452, in __init__
    options = expand_params(self)
              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\params.py", line 1094, in expand_params
    _, inter_param, params, injections = collect_params(command.callback, sig)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\params.py", line 1000, in collect_params
    paraminfo = ParamInfo.from_param(parameter, {}, doc)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\params.py", line 627, in from_param
    self.parse_annotation(type_hints.get(param.name, param.annotation))
  File "C:\Users\User\scoop\apps\python\current\Lib\site-packages\disnake\ext\commands\params.py", line 784, in parse_annotation
    raise TypeError(f"{annotation!r} is not a valid parameter annotation")
TypeError: <class 'disnake.interactions.base.Interaction'> is not a valid parameter annotation
#

@near girder

#

wtf is going on here

near girder
valid seal
#
from disnake.ext.commands import InteractionBot, Bot
from os import environ
import disnake
from disnake.ext.commands import Cog ,Bot
from disnake.ext import commands
from disnake import Interaction, Member
from datetime import timedelta

bot = Bot()
#bot.add_cog(TimeoutCommand(bot))
@bot.slash_command()
async def timeout(interaction: Interaction): await interaction.send("Hello World")

if __name__ == "__main__" and "TOKEN" in environ:
    bot.run(environ["TOKEN"])
#

this error is so weird

near girder
#

use CmdInter instead of interaction

#

for the parameters

valid seal
#

what's the fuss though

#

slash_command equivalent was working with nextcord mmhtent

near girder
#
import disnake
from disnake.ext import commands


class PingCommand(commands.Cog):
    """This will be for a ping command."""

    def __init__(self, bot: commands.Bot):
        self.bot = bot

    @commands.slash_command()
    async def ping(self, inter: disnake.ApplicationCommandInteraction):
        """Get the bot's current websocket latency."""
        await inter.response.send_message(f"Pong! {round(self.bot.latency * 1000)}ms")
#

btw the

#

"""Get the bot's current websocket latency."""

#

is used as the command description

valid seal
near girder
valid seal
#

that doesn't explain my question

near girder
#

also this is good to look over

valid seal
#

it loaded i needed to refresh discord

near girder
#

u can make it ephemeral too

#

which means only the user who ran the command will see the error msg

valid seal
#

that's a later thing

#

lets first implement everything

near girder
#

its just an

#

ephemeral=True

#

arg

#

personally i prefer it for error messages so it doesn’t clog up a channel but idk what @tender snow wants

valid seal
#

can you join the server and tell me if you see this

little sundial
valid seal
#

check pins

near girder
#

show code

tender snow
near girder
#

also @tender snow how do we plan on keeping track of users n such

#

like punishments and all that

#

mongodb?

tender snow
#

Ye unless there a better storage implementation that someone wants

near girder
#

once ur done with timeout stuff aetopia push it and then lemme see if theres refactorings to do before anyone adds more stuff

little sundial
#

motor asyn

tender snow
#

@tender snow nom nom’d @tender snow’s message in #💬・main

#

Real

little sundial
#

client = AsyncIOMotorClient(MONGODB_URI)

#

MONGODB_URI = getenv("MONGODB_URI") or exit("MONGODB_URI is not set in the .env!")

midnight wolf
little sundial
#

stop

midnight wolf
#

or just make a file named after the user’s id, and each line is duration, a comma and the description of the offense

little sundial
#

im going to find you for this one

midnight wolf
little sundial
#

and show how databases work on baggets

#

baguetes

#

baugetes

midnight wolf
#

baguettes

#

there’s two T’s

#

just like in CTT

little sundial
#

oh yes i just said that

near girder
#

need nerdleur emoji

midnight wolf
near girder
valid seal
little sundial
valid seal
#

june why did you leave my testing server, just wondering

little sundial
#

why

valid seal
little sundial
valid seal
#

offenses could be stored as <id>.bin

near girder
#

id like mongodb but who would pay for it

#

there’s a free cluster but idk if it’s good for a bot in many servers

valid seal
valid seal
#

@near girder anything newly implemented with the bot?

near girder
#

this is being revived!!!!

midnight wolf
little sundial
#

i have chanted a spell

near girder
near girder
midnight wolf
#

Motion

humble flower
#

At your Front Door.