#discord-bots

1 messages Ā· Page 928 of 1

manic wing
#

i was joking

slate swan
#

i cant finf the channel code

slim ibex
#

!d discord.Guild.get_channel

unkempt canyonBOT
#

get_channel(channel_id, /)```
Returns a channel with the given ID.

Note

This does *not* search for threads.

Changed in version 2.0: `channel_id` parameter is now positional-only.
manic wing
#

do you have a .env with a var called TOKEN = ... in it?

brisk zodiac
slate swan
#

is the .env named TOKEN?

manic wing
#

well this error is saying you're passing None

brisk zodiac
manic wing
slate swan
manic wing
#

can I clarify that your .env file is actually named .env?

slate swan
#

look if your running that on ur local pc no need to hide it just put the token

slate swan
manic wing
slate swan
manic wing
#

same error?

brisk zodiac
slate swan
slate swan
manic wing
slate swan
manic wing
#

doesnt matter if you're on client or browser

slate swan
# slate swan yes

just go on the url and the last string is the channel id when you click the channel

#

look at the url

boreal ravine
#

use os.environ

hidden meadow
#

hello

slate swan
slate swan
slate swan
hidden meadow
slate swan
slate swan
hidden meadow
slate swan
slate swan
hidden meadow
slate swan
hidden meadow
slate swan
slate swan
hidden meadow
slate swan
# hidden meadow okey thanks

If you can't self host or use a vps, you could use free stuff like uptimerobot, even tho that's not really a good option.

slate swan
#

that arent in many servers

#

the response time will be slow

#

if its too many

slate swan
boreal ravine
slate swan
#

It usually gives like 99.3% uptime.

slate swan
slate swan
slate swan
slim ibex
#

host on a vps

jade jolt
#

i use a service that costs $3 monthly and its only gone down once for about 5 minutes

slate swan
#

Fun

slim ibex
#

i hosted my old bot on vultr

slate swan
#

how to make profile-role clickable

#
@client.event
async def on_member_join(member):
  guild = client.get_guild(930722774513754112)
  channel = guild.get_channel(930722774513754114)
  profile-roles = guild.get_channel(936819091992354826)
  await channel.send(f"Welcome to the server Friend {member.mention}! You can do your #🌹{profile-roles}, if you want us to know you better.")
  await member.send(f"We are so excited you have joined our 'Average' community! {member.mention}, with your great personality, you are going to be a great addition. Welcome!")

static beacon
slate swan
static beacon
#

np

slate swan
# static beacon np

how can i make the welcome msg whr the profile role channel will be clickable

static beacon
static beacon
#

for user ids you can use <@idhere> but its automatic if you use .mention

slate swan
static beacon
#

and for roles you can use <&@role id>

static beacon
#

type that

slate swan
static beacon
slate swan
# slate swan ```py @client.event async def on_member_join(member): guild = client.get_guild...
@client.event
async def on_member_join(member):
  guild = client.get_guild(930722774513754112)
  channel = guild.get_channel(930722774513754114)
 
  await channel.send(f"Welcome to the server Friend {member.mention}! You can do your #channel-name, if you want us to know you better.")
  await member.send(f"We are so excited you have joined our 'Average' community! {member.mention}, with your great personality, you are going to be a great addition. Welcome!")
static beacon
static beacon
#

Welcome to the server Friend {member.mention}! You can do your [#936819091992354826](/guild/267624335836053506/channel/936819091992354826/)

#

[#936819091992354826](/guild/267624335836053506/channel/936819091992354826/)

#

i cant see the channel so i cant mention it

#

same with your bot, so make sure your id is correct

slate swan
#
 await channel.send(f"Welcome to the server Friend {member.mention}! You can do your [#936819091992354826](/guild/267624335836053506/channel/936819091992354826/), if you want us to know you better.")
#
@client.event
async def on_member_join(member):
  guild = client.get_guild(930722774513754112)
  channel = guild.get_channel(930722774513754114)
  
  await channel.send(f"Welcome to the server Friend {member.mention}! You can do your [#936819091992354826](/guild/267624335836053506/channel/936819091992354826/), if you want us to know you better.")
  await member.send(f"We are so excited you have joined our 'Average' community! {member.mention}, with your great personality, you are going to be a great addition. Welcome!")
slim ibex
slim ibex
#

except discord.Forbidden or something like that

#

!d discord.Forbidden

unkempt canyonBOT
#

exception discord.Forbidden(response, message)```
Exception that’s raised for when status code 403 occurs.

Subclass of [`HTTPException`](https://discordpy.readthedocs.io/en/master/api.html#discord.HTTPException "discord.HTTPException")
slate swan
#
@client.event
async def on_member_join(member):
  guild = client.get_guild(930722774513754112)
  channel = guild.get_channel(930722774513754114)
  await channel.send(f"Welcome to the server Friend {member.mention}! You can do your [#936819091992354826](/guild/267624335836053506/channel/936819091992354826/), if you want us to know you better.")
  try:
    await member.send(f"We are so excited you have joined our 'Average' community! {member.mention}, with your great personality, you are going to be a great addition. Welcome!")
  except:
    pass
static beacon
slim ibex
#

If DMChannel is closed, it either raises Forbidden or HTTPException

slate swan
slim ibex
#

?

slim ibex
#

are you suggesting a bare except?

slate swan
slim ibex
#

uh no

slate swan
#

how?

slim ibex
#

you don’t even know if an error was raised

boreal ravine
slim ibex
#

don’t think get channel is a coro

boreal ravine
#

all fetch_x methods are coroutines

slim ibex
#

oh yeah fetch is

hushed galleon
#

fetch_channel isnt usually needed as discord keeps your bot pretty well updated with guild stuff

boreal ravine
#

yea

slate swan
static beacon
#

i hate making avatars for my bot

static beacon
slate swan
static beacon
brisk zodiac
#

Why it said this error ?
Traceback (most recent call last):
File "main.py", line 25, in <module>
client.run(os.getenv('TOKEN'))
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run
return future.result()
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 665, in start
await self.login(*args, bot=bot)
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/http.py", line 300, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/http.py", line 216, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

slim ibex
#

you don’t know if an error happened because it passed

slim ibex
brisk zodiac
slim ibex
manic wing
slim ibex
#

^

static beacon
static beacon
#

except Exception as e: i just had a stroke

slim ibex
#

That’s just as bad

brisk zodiac
slim ibex
#

as a bare except

static beacon
#

🐚

brisk zodiac
#

I know

static beacon
brisk zodiac
slate swan
#

u gotta wait a few minutes

static beacon
#

kill 1 changes ip ptoo

brisk zodiac
slate swan
brisk zodiac
slate swan
#

Minutes

slate swan
static beacon
brisk zodiac
brisk zodiac
static beacon
#

even a spare laptop

#

anything that can run notepad and command prompt honestly

brisk zodiac
#

I'm using macbook

static beacon
brisk zodiac
#

okay

slate swan
slim ibex
#

Host on a Linux vps

brisk zodiac
slate swan
#

because im sure you turn ur pc off

static beacon
brisk zodiac
#

can i run it now?

static beacon
#

@slate swan ps: the help command doesnt work if the guild doesnt have a icon (getting a dev to change that soon)

spring flax
#

How does one have a command where two arguments are seperated by commas?

static beacon
slim ibex
#

like when invoking?

static beacon
#

like one arg would be example foo and the execution would be !command arg1, arg2, foo

slim ibex
#

why would you need that though. Use * or Greedy to consume the arguments after into one argument

static beacon
#

and spacing is a pain

spring flax
#

when invoking

static beacon
#

im trying to figure out how to invoke more than one argument with no spaces

spring flax
#

like the command is used by ?name arg1, arg2

slim ibex
#

split the arguments by a comma

#

!d str.split

unkempt canyonBOT
#

str.split(sep=None, maxsplit=- 1)```
Return a list of the words in the string, using *sep* as the delimiter string. If *maxsplit* is given, at most *maxsplit* splits are done (thus, the list will have at most `maxsplit+1` elements). If *maxsplit* is not specified or `-1`, then there is no limit on the number of splits (all possible splits are made).

If *sep* is given, consecutive delimiters are not grouped together and are deemed to delimit empty strings (for example, `'1,,2'.split(',')` returns `['1', '', '2']`). The *sep* argument may consist of multiple characters (for example, `'1<>2<>3'.split('<>')` returns `['1', '2', '3']`). Splitting an empty string with a specified separator returns `['']`.

For example:
spring flax
#

yeah i got it

#

split ctx.message

static beacon
slate swan
#

#bot-commands

slate swan
brisk zodiac
#

it said this now
Traceback (most recent call last):
File "main.py", line 25, in <module>
client.run(os.getenv('TOKEN'))
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run
return future.result()
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.

Discord Developer Portal

Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.

boreal ravine
static beacon
unkempt canyonBOT
#

Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.

To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.

Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.

slate swan
slate swan
slate swan
slate swan
#

chose the bot ur working on

brisk zodiac
#

Wow it worked now

#

thank you guys so much

slate swan
#

your welcome

brisk zodiac
slate swan
#

btw Cesiyi

brisk zodiac
#

File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 18, in on_member_join
channel = guild.get_channel(955726308787245086)
NameError: name 'guild' is not defined

#

It now said this

slate swan
#

its gotta be ctx or member

brisk zodiac
#
import os
import discord
from discord.ext import commands
from discord.utils import get
from discord import Intents
from dotenv import load_dotenv

load_dotenv()
intents = Intents.default()
intents.members = True

client = commands.Bot(command_prefix="!", intents=intents)

client.remove_command("Help")

@client.event
async def on_member_join(member):
    channel = guild.get_channel(955726308787245086)
    await channel.send(f"{member.mention} has just joined the server!")

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))

client.run(os.getenv('TOKEN'))```
slate swan
#

!d discord.Member.guild

unkempt canyonBOT
slate swan
#

Use that

#

PS C:\Users\NISHA\VScode\PythonCode> pip requests
ERROR: unknown command "requests"
PS C:\Users\NISHA\VScode\PythonCode> pip requests
ERROR: unknown command "requests"
PS C:\Users\NISHA\VScode\PythonCode> & C:/Users/NISHA/AppData/Local/Programs/Python/Python310/python.exe c:/Users/NISHA/VScode/PythonCode/MyFirstbot.py
Traceback (most recent call last):
File "c:\Users\NISHA\VScode\PythonCode\MyFirstbot.py", line 3, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
PS C:\Users\NISHA\VScode\PythonCode>

slate swan
#

y request cant import

#

on shell

#

oh wait

slate swan
#

pip install requests

#

not pip

#

and for flask?

#

pip install flask?

brisk zodiac
#

Traceback (most recent call last):
File "/home/runner/Welcoming-Bot-1/venv/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 19, in on_member_join
await channel.send(f"{member.mention} has just joined the server!")
NameError: name 'channel' is not defined

#

This now

slate swan
#

hi hithink

slate swan
slate swan
#

basic python

#
guild = member.guild
channel = guild.get_channel(ID)
await channel.send()
slate swan
# brisk zodiac ```py import os import discord from discord.ext import commands from discord.uti...
import os
import discord
from discord.ext import commands
from discord.utils import get
from discord import Intents
from dotenv import load_dotenv

load_dotenv()
intents = Intents.default()
intents.members = True

client = commands.Bot(command_prefix="!", intents=intents)

client.remove_command("Help")

@client.event
async def on_member_join(member):
    channel = member.guild.get_channel(955726308787245086)
    await channel.send(f"{member.mention} has just joined the server!")

@client.event
async def on_ready():
    print('We have logged in as {0.user}'.format(client))

client.run(os.getenv('TOKEN'))
#

that code is bad ngl

#
  1. use f strings
  2. use listen and not event
  3. remove the help command in the constructor
  4. why import the intents class?
#
  1. remove_command("help")
slate swan
slate swan
#

If you say so.

slate swan
slate swan
slate swan
slate swan
slate swan
#

That's great

slate swan
#

good thing about listeners lmao

slate swan
slate swan
#

oh, it's someone else's code

#

if youre gonna spoonfeed someone do it right

#

it's still against the ToS

#

performance: yea its fine

#

!ytdl

unkempt canyonBOT
#

Per Python Discord's Rule 5, we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders, as their usage violates YouTube's Terms of Service.

For reference, this usage is covered by the following clauses in YouTube's TOS, as of 2021-03-17:

The following restrictions apply to your use of the Service. You are not allowed to:

1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as specifically permitted by the Service;  (b) with prior written permission from YouTube and, if applicable, the respective rights holders; or (c) as permitted by applicable law;

3. access the Service using any automated means (such as robots, botnets or scrapers) except: (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; (b) with YouTube’s prior written permission; or (c) as permitted by applicable law;

9. use the Service to view or listen to Content other than for personal, non-commercial use (for example, you may not publicly screen videos or stream music from the Service)
slate swan
#

Would be against these

static beacon
brisk zodiac
spring flax
#

if I have ```py
class Suggestion_Modal(disnake.ui.Modal):
def init(self, cog):

if not (await check_if_suggestion_blocked(interaction.author.id)):
#code

class Suggestion(commands.Cog):
def init(self, bot):
self.bot = bot
async def check_if_suggestion_blocked(# arguments):
#function

how do I access the `check_if_suggestion_blocked` that's in the cog from the suggestion modal above?
slate swan
#

how to see the messages my bot get in inbox

hushed galleon
slate swan
static beacon
# slate swan what?

its annoying when people just "ask" me for code in dms so ive just given them code with errors in it (basic errors like indentation, typos, caps, etc) and just stopped responding

#

its a nice challenge for them

#

because they actually learn along the way

static beacon
#

unless they dont

hushed galleon
slate swan
delicate hornet
#

how long does to take before dev portal changes update to discordapp

slate swan
#

you just restart your client and wait for it to cache the changes thats all,dev portal changes are done quickly

dull terrace
#

Message intents are enforced on 31st April right?

slate swan
#

nah

#

early 2023

quaint epoch
slate swan
spring flax
#

not sure what i did wrong, but i tried

slate swan
spring flax
slate swan
#

why do you need the cog?

spring flax
#

because the function is in the cog

spring flax
#

i don't get what you mean by that

slate swan
spring flax
#

oh

#

not sure, but i can try

cloud dawn
ornate linden
#

How can I get my bot to catch 403s?

#

what's the flag in on_command_error

manic wing
unkempt canyonBOT
#

exception discord.HTTPException(response, message)```
Exception that’s raised when an HTTP request operation fails.
manic wing
#

you can check for this and use error.status

#

!d discord.HTTPException.status

unkempt canyonBOT
slate swan
#

What does ā€œrequirement already satisfiedā€ means?
I’m trying to import discord.py-message-components

Or any way to import it

manic wing
slate swan
#

I used pip install discord.py-message-components

slate swan
#

And I have a import with name

from discord import Button, SelectMenu, SelectOption

But the console says :
from discord import Button, SelectMenu, SelectOption
ImportError: cannot import name ā€˜Button’ from ā€˜discord’

cloud dawn
manic wing
manic wing
cloud dawn
manic wing
#

!pypi buttons

unkempt canyonBOT
manic wing
cloud dawn
slate swan
#

k

manic wing
cloud dawn
manic wing
#

what

cloud dawn
manic wing
#

tell me you're trolling

cosmic agate
#

how to know which guilds our bot is in?

manic wing
unkempt canyonBOT
cloud dawn
#

No, i'm pretty against making extensions in pypi's it's too messy.

manic wing
slate swan
spring flax
cloud dawn
slate swan
#

oh kden

cloud dawn
cloud dawn
manic wing
#

that stuff is discords stuff

#

it just has documentation

spring flax
#

error:

    if not (await Suggestor().check_if_suggestion_blocked(inter.author.id)):
TypeError: Suggestor.__init__() missing 1 required positional argument: 'bot'

Code:

class Suggestion_Modal(disnake.ui.Modal):
    def __init__(self) -> None:
  #modal stuff

    async def callback(self, inter: disnake.ModalInteraction) -> None:
        if not (await Suggestor().check_if_suggestion_blocked(inter.author.id)):
          #code

class Suggestor(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    async def check_if_suggestion_blocked(self, member_id):
        async with self.bot.db.execute("SELECT member_id from suggestion_blocks WHERE member_id = ?", (member_id,)) as cursor:
            data = await cursor.fetchone()
            if not data:
                return True
            else:
                return False
#

should i be putting the function async def check_if_suggestion_blocked in another file and import it instead of putting it within the cog?

manic wing
vale wing
#

^

spring flax
vale wing
#

Why use a separate class when you can just compose it all into a modal subclass

spring flax
#

what do you mean?

vale wing
#

One of OOP terms - composition

spring flax
#

my cog has more than just that function, i only sent the relevant parts

#

cog class

vale wing
#

Oh

#

Well is that func of Suggestor used in Suggestor itself?

spring flax
#

yeah

#

for a command

manic wing
vale wing
#

Anyways I think you should extract it from cog

manic wing
#

and when you call SuggestionModel you just pass bot

vale wing
#

You shouldn't put functions that are used outside of the cogs into the cogs

spring flax
#

yeah i got it I'm doing it now

vale wing
#

Unless you declare it as a staticmethod

spring flax
#

so put it outside both classes?

manic wing
#

not necessarily

vale wing
#

I usually have a module with functions for that kind of stuff you may do the similar thing

slate swan
#

I have the error for import

I’m using from discord import Select, SelectOption, SelectMenu

Console says:

ImportError: cannot import name ā€˜Select’ from ā€˜discord’

vale wing
#
from discord.ui import ...```
#

If you are using dpy 2.0

slate swan
vale wing
#

Which you should be using

placid skiff
slate swan
#

ModuleNotFoundError: no module named ā€˜discord.ui’

manic wing
#

aka you're not on 2.0

manic wing
slate swan
#

& how can I be on 2.0
Imports

vale wing
slate swan
#

i ment it as the creation of an instance hence why i called it

#

but you do have a point

vale wing
#

I get what you meant that's just uh barely noticeable

slate swan
vale wing
#

Kk

slate swan
#

class naming lol

cosmic agate
#

how to know which guilds our bot is in?

vale wing
#

!d discord.ext.commands.Bot.guilds

unkempt canyonBOT
cosmic agate
#

doesnt help

slate swan
#

bro what

vale wing
#

len(bot.guilds)

cosmic agate
#

?

#

hmm

slate swan
#

it returns a list of Guild objects you cant say it doesnt help

manic wing
vale wing
#

Why understand docs when you can copypaste

manic wing
#

and the third time you've gotten the same answer

cosmic agate
#

nvm i find

vale wing
#

Ok

slate swan
#

nextcord has docs for a reasonsniff

delicate hornet
#

where do i send api requests for bots to?

vale wing
#

Um

#

You mean discord endpoints?

manic wing
#

!d nextcord.Client.guilds

unkempt canyonBOT
#

property guilds: List[nextcord.guild.Guild]```
The guilds that the connected client is a member of.
manic wing
#

works fine.

vale wing
#

Documentation tab

vale wing
#

Yes and you may also specify a version

#

https://discord.com/api/v9 for example

maiden fable
#

v10 is the latest Yup

junior verge
#

How do I remove this weird shit

#

it changed my code too

vale wing
#

Erase it

spring flax
#

what's the best way to add a reaction to a message? I find bot.get_emoji very inefficient as it returns None sometimes

junior verge
#

yeah but why does it get there

vale wing
#

Merge conflicts ig

junior verge
#

weird

#

maybe bc of git push pull etc

maiden fable
spring flax
#

it's <:emoji_name : emoji_id> right?

#

wait why doesn't putting \ behind an emoji show raw format

delicate hornet
delicate hornet
spring flax
#

this is what happens for me

#

whoooops nevermind

#

!d discord.Object

unkempt canyonBOT
#

class discord.Object(id)```
Represents a generic Discord object.

The purpose of this class is to allow you to create ā€˜miniature’ versions of data classes if you want to pass in just an ID. Most functions that take in a specific data class with an ID can also take in this class as a substitute instead. Note that even though this is the case, not all objects (if any) actually inherit from this class.

There are also some cases where some websocket events are received in [strange order](https://github.com/Rapptz/discord.py/issues/21) and when such events happened you would receive this class rather than the actual data class. These cases are extremely rare.

x == y Checks if two objects are equal.

x != y Checks if two objects are not equal.

hash(x) Returns the object’s hash.
spring flax
#

!d discord.Guild.unban

unkempt canyonBOT
#

await unban(user, *, reason=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Unbans a user from the guild.

The user must meet the [`abc.Snowflake`](https://discordpy.readthedocs.io/en/master/api.html#discord.abc.Snowflake "discord.abc.Snowflake") abc.

You must have the [`ban_members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.ban_members "discord.Permissions.ban_members") permission to do this.
manic wing
#

what

terse blade
#
async def on_member_join(member: disnake.Member):
  channel = client.get_channel(953020283386757161)
  await channel.send(f'Welcome to the discord {member.mention}! ')
  await member.add_roles(953020268656353350)```
why dosent this add role neither send message to the channel
junior verge
#

uh

manic wing
#

i would walk you through it but i really cant be bothered; just add the -f to the push again -_

junior verge
#

I did, still didn't update on my repo

primal fox
junior verge
#

uh pretty sure there is

terse blade
primal fox
junior verge
slate swan
junior verge
#

got any idea

slate swan
junior verge
#

ye

slate swan
#

show db file and code

junior verge
#

I can't show the db file

#

theres no code like for it

slate swan
#

their is if it raises an operation error?

terse blade
# primal fox try getting the role first
async def on_member_join(member):
  guild = client.get_guild(772968562054660107)
  channel = guild.get_channel(953020283386757161)
  role = guild.get_role(953020268656353350)
  await channel.send(f"Welcome to the server {member.mention}!")
  await member.add_roles(role)```?
#

dosent add role neither send message

primal fox
junior verge
primal fox
junior verge
#

Got any idea on how to fix it?

tawny swallow
#

I want to buy a VPS from GalaxyGate. Which OS is the best for discord bots?

dull terrace
#

how do i format this embed to look cleaner?

junior verge
quaint epoch
dull terrace
#

thinking about fields but that would be awkward

quaint epoch
dull terrace
quaint epoch
#

maybe changing colors and using authors and footnotes

ebon cave
#

what does that error mean:
Traceback (most recent call last):
File "main.py", line 14, in <module>
client.run(token)
File "/home/runner/haha21/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run
return future.result()
File "/home/runner/haha21/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/home/runner/haha21/venv/lib/python3.8/site-packages/discord/client.py", line 666, in start
await self.connect(reconnect=reconnect)
File "/home/runner/haha21/venv/lib/python3.8/site-packages/discord/client.py", line 601, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to

terse blade
quaint epoch
terse blade
#
async def on_member_join(member):
  disnake.utils.get(guild.channel, id=953020283386757161)
  disnake.utils.get(guild.roles, id=953020268656353350)
  await channel.send(f"Welcome to the server {member.mention}!")
  await member.add_roles(953020268656353350)```
quaint epoch
dull terrace
#

alright imma try to add fields but i don't think itll work caus i need two sections

primal fox
ebon cave
quaint epoch
ebon cave
#

or enable disabled ones?

quaint epoch
#

go to your dev portal and enable the intents that were disabled

terse blade
#

still dosent work

ebon cave
#

ok

slate swan
gaunt ice
terse blade
#

learn to code

dull terrace
#

can you put two embeds in one message?

slate swan
#

!d discord.ext.commands.has_permissions

unkempt canyonBOT
#

@discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.check "discord.ext.commands.check") that is added that checks if the member has all of the permissions necessary.

Note that this check operates on the current channel permissions, not the guild wide permissions.

The permissions passed in must be exactly like the properties shown under [`discord.Permissions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions "discord.Permissions").

This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
gaunt ice
#

@commands.has_permissins(ban_members = True)

junior verge
terse blade
#
@bot.event
async def on_member_join(member):
  channel = disnake.utils.get(guild.channel, id=953020283386757161)
  role = disnake.utils.get(guild.roles, id=953020268656353350)
  await channel.send(f"Welcome to the server {member.mention}!")
  await member.add_roles(role)```
wont work
terse blade
#

it dosent do anything

slate swan
gaunt ice
#

np

slate swan
#

not correct*

slate swan
terse blade
#

so..

gaunt ice
#

not anymore

slate swan
gaunt ice
terse blade
gaunt ice
terse blade
gaunt ice
#

u meant the server....

terse blade
#

no i mean the discord..........................

slate swan
gaunt ice
#

ahh okimii halp

terse blade
gaunt ice
#

lol

slate swan
junior verge
terse blade
#

oh i got rid of my intents

#

šŸ’€

slate swan
terse blade
#

how do you enable intents

junior verge
#

wait getting this error now

slate swan
#

!intents

unkempt canyonBOT
#

Using intents in discord.py

Intents are a feature of Discord that tells the gateway exactly which events to send your bot. By default, discord.py has all intents enabled, except for the Members and Presences intents, which are needed for events such as on_member and to get members' statuses.

To enable one of these intents, you need to first go to the Discord developer portal, then to the bot page of your bot's application. Scroll down to the Privileged Gateway Intents section, then enable the intents that you need.

Next, in your bot you need to set the intents you want to connect with in the bot's constructor using the intents keyword argument, like this:

from discord import Intents
from discord.ext import commands

intents = Intents.default()
intents.members = True

bot = commands.Bot(command_prefix="!", intents=intents)

For more info about using intents, see the discord.py docs on intents, and for general information about them, see the Discord developer documentation on intents.

terse blade
#

im using disnake

bleak karma
#
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "main.py", line 17, in <module>
    bot.load_extension('cogs.rr')
  File "/home/runner/keiro/venv/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 789, in load_extension
    self._load_from_module_spec(spec, name, extras=extras)
  File "/home/runner/keiro/venv/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 678, in _load_from_module_spec
    raise errors.ExtensionFailed(key, e) from e
nextcord.ext.commands.errors.ExtensionFailed: Extension 'cogs.rr' raised an error: SyntaxError: invalid syntax (pr.py, line 30)
īŗ§ 

what does this error mean?

slate swan
tawny swallow
slate swan
slate swan
junior verge
tawny swallow
bleak karma
terse blade
slate swan
unkempt canyonBOT
#
Not in a million years.

No documentation found for the requested symbol.

slate swan
#

lol not a color

junior verge
slate swan
#

you could hexcode

junior verge
#

ah ye ill just do that then ig

slate swan
manic wing
slate swan
tawny swallow
manic wing
#

it says received method aka it exists but its a classmethod, meaning you call it

quaint epoch
manic wing
quaint epoch
#

maybe you can bold the numbers

dull terrace
slate swan
#

?

quaint epoch
dull terrace
#

no way to tell how many lines ingredients will be on different screens

manic wing
dull terrace
#

itll be different for everyone

slate swan
#

discord.Color.random

junior verge
#

I am using sqlite db and discord.py, I am not sure why but when I do .setprefix ! it sends me a message it changed but it did not change.

tawny swallow
manic wing
manic wing
#

might as well just use ubuntu server

inner epoch
#

Any ever played ifttt stuff?

#

I mean coded something

dull terrace
#

oh wow i just checked on my phone and fields don't even appear on the same lines

slate swan
dull terrace
#

it's broken for everything

tawny swallow
dull terrace
#

each of these appear on new lines

manic wing
dull terrace
#

how tf am i supposed to format this so it doesn't look dumb on phones

manic wing
tawny swallow
dull terrace
craggy cloak
#
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.8/site-packages/discord/client.py", line 373, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 54, in on_message
    game = bot.games[msg.guild.id]
TypeError: 'set' object is not subscriptable
unkempt canyonBOT
#
set

class set([iterable])``````py

class frozenset([iterable])```
Return a new set or frozenset object whose elements are taken from *iterable*. The elements of a set must be [hashable](https://docs.python.org/3/glossary.html#term-hashable). To represent sets of sets, the inner sets must be [`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset "frozenset") objects. If *iterable* is not specified, a new empty set is returned.

Sets can be created by several means:

• Use a comma-separated list of elements within braces: `{'jack', 'sjoerd'}`

• Use a set comprehension: `{c for c in 'abracadabra' if c not in 'abc'}`

• Use the type constructor: `set()`, `set('foobar')`, `set(['a', 'b', 'foo'])`...
manic wing
#

it shut down, it reopened.

ebon cave
#

why does my bot sometimes not find the command?

manic wing
#

@slate swan

delicate hornet
#

where can i find a valid url for the bot?
the things i tryed give "Unauthorized"
because i cant find it

maiden fable
#

Isn't it fun...

slate swan
#

im playing clash royale

unkempt canyonBOT
#

discord/colour.py line 331

Color = Colour```
dull terrace
#

it's the same for all fields on mobile.... inline does not work even if there's tons of space

manic wing
#

v2.0

dull terrace
#

wtfff

maiden fable
slate swan
#

it was

maiden fable
#

maybe from before that

slate swan
#

im not sure why hes showing me the creation of the instance

maiden fable
#

🤷

dull terrace
#

fffffffff

ebon cave
#

whats that:

slate swan
#

as danny made it as aliases

manic wing
#

it doesnt have any documentation.

#

because its an alias not a class.

#

hence why its in the docs.

maiden fable
manic wing
#

!d discord.Colour.green

unkempt canyonBOT
#

classmethod green()```
A factory method that returns a [`Colour`](https://discordpy.readthedocs.io/en/master/api.html#discord.Colour "discord.Colour") with a value of `0x2ecc71`.
slate swan
#

ah thats your point

maiden fable
ebon cave
manic wing
maiden fable
manic wing
#

yw okimii

slate swan
#

for what

ebon cave
#

yes

manic wing
ebon cave
slate swan
maiden fable
#

@manic wing mind telling Marksman?

manic wing
#

telling him what

slate swan
#

to load his cog

ebon cave
#

cuz my script has an issue

slate swan
#

the command isnt found its probably the cog hasnt been loaded or indents

maiden fable
#

@slate swan weren't u playing Clash Royale? šŸ‘€

ebon cave
#

the indents are loading

ebon cave
#

cuz the other commands work

manic wing
#

we are here to give information, not give out free thumbs to suck

slate swan
manic wing
#

infact i told you 3 things you couldnt figure out

#

in the space of 5 minutes

#

i love being cocky

slate swan
formal basin
slate swan
#

my point is you are giving out thumbs to suck?AG_ChikaStunned

manic wing
ebon cave
#

so what can i do?

slate swan
formal basin
# formal basin

I want it to send a message every 10 seconds (I will change it to 3 hours)

maiden fable
#

Stop it @slate swan @manic wing. Take this to an ot channel

slate swan
#

hunter jealous whyyy

maiden fable
#

Ofc ofc

slate swan
ebon cave
#

ok got i guess

slate swan
#

show your code

ebon cave
#

i forgot to trigger

slate swan
#

trigger what

ebon cave
#

the command

#

im just dumb

#

thx anyways

slate swan
#

wasnt your command giving an unknown command errorthink

formal basin
#

I want it to send a message every 10 seconds (I will change it to 3 hours)

slate swan
#

just use a task loop

formal basin
slate swan
manic wing
#

another one that isnt officially documented šŸ˜

#

!d discord.ext.tasks.loop | this is though <3

unkempt canyonBOT
#

discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True)```
A decorator that schedules a task in the background for you with optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
slate swan
#

it is

manic wing
slate swan
#

ah

manic wing
#

bows make that 4 things

slate swan
#

smh

slate swan
formal basin
manic wing
#

and if you think you're on my level, be my guest to prove that to me

slate swan
#

your so cocky its honesty embarrassing to have a conversation with you

#

im just gonna go and not waste my free time

manic wing
#

😳

formal basin
manic wing
#

ive been watching too much suits

quaint epoch
formal basin
#

Why is it not defined

formal basin
quaint epoch
#

and can you show the rest of the code

quaint epoch
formal basin
#

Oh

quaint epoch
#

from discord.ext import tasks

dull terrace
#

theres actually no good way to format my embeds ffs

formal basin
#

I won’t send

quaint epoch
#

when you fetch/get objects in dpy or any fork, they take ints as id's unless specified

#

read the docs dude

dull terrace
#

how do i format this to work on mobile, i can't use fields because they end up on new lines for each field, using a seperate field for each item takes up too much space. using plain text looks an absolute mess.

#

i think the only thing i can do is go back to trying to somehow work out spacing between words with code to manually create fields with plain text

#

😭

#

at least that seems to be consistent across mobile and desktop

vale wing
delicate hornet
slate swan
#

your bots token

delicate hornet
vale wing
#

Bot sfiuyiu43w4.w45gw45g.5gw4gw4oghiwp5okpow5kwpotopkopgk

#

That thing is "token" don't mind

#

Don't forget about the Bot before token itself

terse blade
#
@bot.listen()
async def on_member_join(member: disnake.Member):
  guild = ['772968562054660107']
  role = disnake.utils.get(guild.roles, id=953020268656353350)
  channel = bot.get_channel(953020283386757161)
  await channel.send(f'Welcome to the discord {member.mention}! ')
  await member.add_roles(953020268656353350)
smoky anvil
#

Someone who can help me? How i do a giveaway bot?

#

Tag me when answer

thorn ore
smoky anvil
thorn ore
#

How to make bot that ask question after a answer

thorn ore
topaz apex
#

hmm

#

never done this sorry

thorn ore
#

K

sick birch
thorn ore
#

K thx

spring flax
#

!d discord.ext.commands.Bot.wait_for

unkempt canyonBOT
#

wait_for(event, *, check=None, timeout=None)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits for a WebSocket event to be dispatched.

This could be used to wait for a user to reply to a message, or to react to a message, or to edit a message in a self-contained way.

The `timeout` parameter is passed onto [`asyncio.wait_for()`](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for "(in Python v3.10)"). By default, it does not timeout. Note that this does propagate the [`asyncio.TimeoutError`](https://docs.python.org/3/library/asyncio-exceptions.html#asyncio.TimeoutError "(in Python v3.10)") for you in case of timeout and is provided for ease of use.

In case the event returns multiple arguments, a [`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.10)") containing those arguments is returned instead. Please check the [documentation](https://discordpy.readthedocs.io/en/master/api.html#discord-api-events) for a list of events and their parameters.

This function returns the **first event that meets the requirements**...
dull terrace
#

{
4: "jl",
5: "i",
6: "ftI :,.[]|/!",
7: "r-()",
8: "^*",
9: "z",
10: "kx",
11: "bcdghnpqsuvyJ",
12: "aeoLT=+_?~#$",
13: "AFVZ",
14: "BEHKNPSUXY&",
15: "wCDR",
16: "mGOQ",
17: "M",
19: "%",
21: "W@",
}

#

figured out the widths of all characters in discord

#

jjjllljjjlll
ljljljjjljjj

manic wing
#

ok

dull terrace
#

ww
iiiiii

#

seems accurate

outer parcel
#

I need some ideas to script a fun bot in discord

manic wing
river swift
#

!d help

#

wachi wachi wa

slate swan
#

for short periods šŸ˜”

boreal ravine
#

Tell people to use a database instead (much more efficient)

gaunt ice
#

imagine trying to asyncio.sleep for 10 days giveaway

boreal ravine
#

Well, it'd work if your bot was online for 10 whole days

manic wing
#

hey Cumali, didnt you just try to talk about efficiency and then say to use asyncio.sleep? o.O

boreal ravine
slate swan
manic wing
#

i seem to remember that the other user never asked about efficiency either

river swift
#

How could I make a discord bot from scratch?

manic wing
#

no, they never asked about speed.

#

show me the message

slate swan
#

can you guys take this to an ot channel?

manic wing
#

i am not bringing anything up, was just reminding you :)

slate swan
boreal ravine
#

hey guys, what do you think is the best bot for moderation?

river swift
boreal ravine
slate swan
boreal ravine
#

carl is sometimes offline

slate swan
#

expected that

slate swan
#

rip he stopped typing

#

welp

maiden fable
#

?

slate swan
#

lol

boreal ravine
slate swan
maiden fable
#

Thanks to that, I don't have ban perms but can still ban people via the bot

boreal ravine
#

I can't tell if you actually like it or if your sarcastically saying that

maiden fable
#

Both ig

boreal ravine
#

šŸ—æ

slate swan
#

You are off topic...

slate swan
#

Well this channel is for coding bots, not discussing famous ones.

#

who said that

maiden fable
#

That too (replied to Sten)

maiden fable
boreal ravine
slate swan
#

Hi!

slate swan
maiden fable
boreal ravine
#

Hello

slate swan
#

No you can't

#

you can have spaces

maiden fable
#

You can

#

command_prefix="Hi there this is totally not a spaceless prefix"

slate swan
#

after the prefix

maiden fable
#

He just didn't know bruv, no need to say that

slate swan
#

I'm not trying to lie, I just didn't think so. šŸ¤·ā€ā™‚ļø

maiden fable
#

He was just tryna help u

slate swan
maiden fable
#

Stop it

slate swan
#

Well, the prefix still can't end with a space, can it?

boreal ravine
#

I mean you can't say someone's lying if they don't know something

slate swan
maiden fable
#

It just cannot start with a space, because discord strips the message content

manic wing
#

there is also strip_after_prefix meaning it can have infinite spaces after

#

!d discord.ext.commands.Bot

unkempt canyonBOT
#

class discord.ext.commands.Bot(command_prefix, help_command=<default-help-command>, description=None, **options)```
Represents a discord bot.

This class is a subclass of [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/master/api.html#discord.Client "discord.Client") you can do with this bot.

This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
maiden fable
slate swan
maiden fable
#

!d disnake.ext.commands.Bot.strip_after_prefix

unkempt canyonBOT
#

Whether to strip whitespace characters after encountering the command prefix. This allows for ! hello and !hello to both work if the command_prefix is set to !. Defaults to False.

New in version 1.7.

maiden fable
maiden fable
manic wing
maiden fable
#

Use infinite spaces now

slate swan
maiden fable
#

It is

#

!d discord.ext.commands.Bot.strip_after_prefix

unkempt canyonBOT
#

Whether to strip whitespace characters after encountering the command prefix. This allows for ! hello and !hello to both work if the command_prefix is set to !. Defaults to False.

New in version 1.7.

slate swan
#

Why dont i know anything

maiden fable
#

Caedan made me remember it

slate swan
#

people forget about case insensitive AG_WorrySadge

manic wing
#

what can I say? bows

slate swan
#

I'm gonna go to bed

manic wing
maiden fable
#

cya gn

slate swan
manic wing
#

im a people person

slate swan
maiden fable
#

I was wishing Sten, gn

slate swan
slate swan
manic wing
#

5 emojis in 5 messages

slate swan
#

6 messages with 6 emojis*pepesneaky

smoky anvil
#

whats that?

manic wing
smoky anvil
manic wing
#

!d asyncio.sleep

unkempt canyonBOT
#

coroutine asyncio.sleep(delay, result=None)```
Block for *delay* seconds.

If *result* is provided, it is returned to the caller when the coroutine completes.

`sleep()` always suspends the current task, allowing other tasks to run.

Setting the delay to 0 provides an optimized path to allow other tasks to run. This can be used by long-running functions to avoid blocking the event loop for the full duration of the function call.

Deprecated since version 3.8, removed in version 3.10: The `loop` parameter. This function has been implicitly getting the current running loop since 3.7. See [What’s New in 3.10’s Removed section](https://docs.python.org/3/whatsnew/3.10.html#whatsnew310-removed) for more information.

Example of coroutine displaying the current date every second for 5 seconds:
boreal ravine
#

whats the method that gets called of strip_after_prefix is True?

manic wing
smoky anvil
maiden fable
#

Bruh, I am sleepy... I was googling what is the RGB value of red lmao

boreal ravine
#

yes cayeden

maiden fable
#

!d discord.ext.tasks.loop @unkempt canyon

unkempt canyonBOT
#

discord.ext.tasks.loop(*, seconds=..., minutes=..., hours=..., time=..., count=None, reconnect=True)```
A decorator that schedules a task in the background for you with optional reconnect logic. The decorator returns a [`Loop`](https://discordpy.readthedocs.io/en/master/ext/tasks/index.html#discord.ext.tasks.Loop "discord.ext.tasks.Loop").
maiden fable
#

@slate swan*

boreal ravine
unkempt canyonBOT
#

discord/ext/commands/bot.py line 1204

if self.strip_after_prefix:```
unkempt canyonBOT
#

discord/ext/commands/view.py line 72

def skip_ws(self) -> bool:```
manic wing
#

merry christmas

slate swan
#

I wish we could have the reaction perm here

maiden fable
smoky anvil
#

Someone who can help with giveawy bot?

manic wing
keen lynx
slate swan
boreal ravine
keen lynx
slate swan
boreal ravine
#

off-topic, but what server is that

slate swan
maiden fable
#

LMAO

#

DMs exist

slate swan
#

Great!

slate swan
slate swan
slate swan
#

Who's that?

maiden fable
slate swan
#

ive had a discussion about this topic with her before

boreal ravine
#

Admin

maiden fable
quaint epoch
#

my eyes hurt

slate swan
#

Alright, so your problem is that your eyes hurt?

#

You made a bot in github?

quaint epoch
slate swan
#

How is that code related

static beacon
slate swan
quaint epoch
#

i was wondering if anyone could review the code, because i haven't run it yet

#

i literally am chugging water as we speak

static beacon
slate swan
static beacon
#

use a text file because its still

static beacon
#

not rlly

quaint epoch
#

šŸ‘€

static beacon
#

looks like a waste of time putting it all in a dict

quaint epoch
#

y'all are really good at criticizing

#

but that's why im here

slate swan
#

You made a bot in github bro.

quaint epoch
static beacon
slate swan
boreal ravine
#

@quaint epoch you're 12?

quaint epoch
slate swan
slate swan
quaint epoch
#

who keeps calling me 12?

boreal ravine
#

your about me.. watowski_bruh

quaint epoch
#

goddammit

static beacon
#

why is flip a bad word šŸ’€

slate swan
#

Bro really against tossniff

slate swan
slate swan
quaint epoch
static beacon
static beacon
#

why is slap a bad word

quaint epoch
static beacon
#

and hac

slate swan
#

Imagine barely going through discords age requirementwhyyy

slate swan
static beacon
#

its gonna censor rupee

quaint epoch
boreal ravine
quaint epoch
#

noted

slate swan
static beacon
quaint epoch
static beacon
slate swan
quaint epoch
#

i wrote something to do it for me

boreal ravine
slate swan
static beacon
slate swan
static beacon
boreal ravine
static beacon
quaint epoch
#

are you criticizing what are considered bad words now?

slate swan
quaint epoch
#

the actual file is 300 kb

#

lots of words

slate swan
#

That filter sounds like a 6 year old saying your a bad boy for saying "blo".

static beacon
quaint epoch
static beacon
#

theres no point for all of those

static beacon
slate swan
#

Bro just filter the whole english languageAG_ChikaStunned

quaint epoch
static beacon
#

you have a cog inside of your main file šŸ’€

static beacon
quaint epoch
#

in the entire thing

static beacon
#

at all

slate swan
#

W h y i s e v e r y o n e s p a m m i n g i m a g e s

slate swan
quaint epoch
#

because too lazy

static beacon
static beacon
quaint epoch
#

is everyone here just going through the dictionary?

static beacon
#

no

quaint epoch
#

well it seems it like it

#

oh fuck

static beacon
#

im on the biohazard level 8 radioactive waste that is your bot

slate swan
quaint epoch
#

i've been scrolling through reddit for so long i forgot to submit my music, art, dance, history, and geo assignments now science

boreal ravine
quaint epoch
#

i would've named it a if i could

#

anyway i gotta go speedrun this

slate swan
#

So much things that can be done better in that snippet.

static beacon
#

you also dont need convert_to_list just use ```py
for i in string.replace(' ', ''):
if i == ',':

or better yet. just do this look for it in the message content
quaint epoch
slate swan
#

That whole snippet screams hardcoding

quaint epoch
slate swan
quaint epoch
slate swan
quaint epoch
static beacon
quaint epoch
slate swan
#

Regex is the best thing for filters.

static beacon
boreal ravine
static beacon
#

and its like 3 lines

quaint epoch
#

well if the user enters f*ck it won't block it

#

that's what triggered my ocd anyway

quaint epoch
#

(i don't have ocd okay)

static beacon
quaint epoch
slate swan
static beacon
keen lynx