#discord-bots
1 messages · Page 464 of 1
!d discord.TextChannel.history you can iterate through the messages sent in the ctx.channel or each channel in the guild (there's a limit to how many messages you can check, I think.) And check if the word is in the message.content.
async for ... in history(*, limit=100, before=None, after=None, around=None, oldest_first=None)```
Returns an [`AsyncIterator`](https://discordpy.readthedocs.io/en/stable/api.html#discord.AsyncIterator "discord.AsyncIterator") that enables receiving the destination’s message history.
You must have [`read_message_history`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permissions to use this.
Examples
Usage...
Alr ill see how it goes
Keep in mind 1-100 messages is an API call
So if you were to check 500 messages thats 5 API calls and so on
Why does that matter?
Rate limiting.
ah
Because the ratelimits are somewhat high on this endpoint iirc?
What is "iirc"?
If I remember correctly
Ah.
I was planning on looking at the entire servers messages
Guess ill have to limit it then
Just have on_message tracking words
Put it in a database and you won't need to do any API calls
And save it in a database.
is there an api for new post reddit events?
i normally just use the raw json for reddit but i couldnt automate this my self for new post i dont think
Ok is there a way to stop a command using another command like for instant if I am using /play I want to stop the command through /stop how would I do that ?
I basically know nothing about data bases and I host my bot locally so its barely ever online
well a good time to learn
You still should learn databases
Go to #databases and check the channel pins, anand has posted a lot of resources on sql
Depending on how well you learn you can pick up sql in minutes probably
Afterwards since discord.py is asynchronous your gonna want to check out an async driver for whatever db you want to use
i.e postgres -> asyncpg, mysql -> aiomysql
alr
can I make discord bots in python?
Yes

I'm so confused to why this command isn't working
@commands.command()
async def ping(ctx):
await ctx.send('Pong')
discord.errors.ClientException: Callback for ping command is missing "ctx" parameter.
add self in the arguments
so
yes
when using cogs, you need to add self as an argument in every command
I don't think you can. Can you? stares at the server's name then the channel's name
lmao
Please tell me how to send a video or photo that is on a PC using a bot?
Is this what your supposed to do if you want to delete a message after time?
@commands.command(aliases=["purge","p","c"])
async def clear(self,ctx, amount=5):
await ctx.channel.purge(limit=amount+1)
await ctx.send(f'Cleared {amount} messages!', delete_after=3)
yeah
ok, are the indentations right?
you have to do it like this py @commands.command() async def ping(self): await ctx.message.channel.send('Pong') @slate swan
You forgot self.
oh yeah
I think that's unnecessary
Yes.
yeah
how do i put command code in seperate files instead of one big file with all the commands
What is wrong with this?
@commands.command(aliases=["purge","p","c"])
async def clear(self,ctx, amount=5):
await ctx.channel.purge(limit=amount+1)
await ctx.send(f'Cleared {amount} messages!', delete_after=3)
await ctx.send(f'Cleared {amount} messages!', delete_after=3)
^
IndentationError: unindent does not match any outer indentation level
You can use cogs
Just create a cog folder and put this in your main.py file
for filename in os.listdir('./cogs'):
if filename.endswith('.py'):
bot.load_extension(f'cogs.{filename[:-3]}')
Is there a function like TextChannel.history but for the entire servers history not just a specific channels?
no
how would you type aliases for a command
Is it possible to search an entire servers message history?
top right
command(aliases=[])
@client.command(aliases=['test1', 'test2', 'test3'])
For my bot
@bot.command(aliases=["aliases1","aliases2")
ahhhh i was typing it wrong lol
typo in that
thank yall!
still a typo
@bot.command(aliases=["aliases1", "aliases2"])
So back on my question is it possible to read an entire servers message history
Not just a specific channel
?
Can someone tell you how to send a file that is on your pc using a bot?
thanks
!d discord.File
class discord.File(fp, filename=None, *, spoiler=False)```
A parameter object used for [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send") for sending file objects.
Note
File objects are single use and are not meant to be reused in multiple [`abc.Messageable.send()`](https://discordpy.readthedocs.io/en/stable/api.html#discord.abc.Messageable.send "discord.abc.Messageable.send")s.
thanks
oh in your last message you said "I'm not going to login with my bots token"
So are you gonna use your bot or not?
I'm going to use my bot but im not going to login to its account
@final iron loop through the guild's text_channels and then through the history of each channel.
Yes.
you could create a task for each reading
I thought it worked with files?
em.set_thumbnail(file = "logo.png")
em.set_thumbnail(file = "logo.png")
TypeError: set_thumbnail() got an unexpected keyword argument 'file'
with loop.create_task
but that could get you ratelimited
since they're going to be running concurrently
How would I iterate over channel.history
I'm getting an object is not iterable error right now
you have to call channel.history
if you don't know how to do that, go back to python basics
how do you get the guild the command was used in
ctx.guild
Please tell how would I get the time since when a person is boosting my server
I don't need to go back to basics I just need an example lmao
!d discord.TextChannel.history
async for ... in history(*, limit=100, before=None, after=None, around=None, oldest_first=None)```
Returns an [`AsyncIterator`](https://discordpy.readthedocs.io/en/stable/api.html#discord.AsyncIterator "discord.AsyncIterator") that enables receiving the destination’s message history.
You must have [`read_message_history`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permissions to use this.
Examples
Usage...
its pretty clear
Maybe to you its clear but for some people its not
Hey what should I do if value field of embed.add_field has two possible values
My bot wont work and show "improper token passed"
I ENTERED TOKEN AND NOT CLIENT ID/SECRET
I DIDN'T ADD ANY SPACES OR ANYTHING IN MIDDLE OF THE TOKEN
I ALREADY TRIED REGENERATING THE TOKEN
Send the code without the token
yeah but if you actually read the doc page, you would understand
but it wont wait rn
From my experimentation, buttons seem to stop working after a certain time or the bot is restarted. Is there a way to make them permanent or restore their functionality after the bot is reset?
There is an example of persistent views on the github page
I'll have a look 👍
any1?
your code already does what you want
What is the purpose for this
Because that seems to dm everyone in the server which will likely rate limit the bot
I'm afraid I can't help
As you seem to write malicious code
Hello everyone, don't you know by chance why he writes to me that there are mistakes that I did not do?
it's usually discord.Embed(...)
Why then are there no mistakes here?
hm i'm not really sure without seeing the whole thing. Perhaps you have it defined somewhere
There is no
Why are you getting the token from a config
from discord.ext import commands # This is the part of discord.py that helps us build bots
import discord
#aye yo wtf is all these? lmao
bot = commands.Bot(command_prefix="!")
bot.run("yeetboii")
bot.load_extension("somecommands")
class someCommands(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command(name="ping")
async def ping(self, ctx: commands.Context):
"""Get the bot's current websocket latency."""
await ctx.send(f"Pong! {round(self.bot.latency * 1000)}ms")
@commands.command(name="setstatus")
async def setstatus(self, ctx: commands.Context, *, text: str):
"""Set the bot's status."""
await self.bot.change_presence(activity=discord.Game(name=text))
def setup(bot: commands.Bot):
bot.add_cog(someCommands(bot))
why am i getting an error saying " CommandNotFound: Command "setstatus" is not found"
Wont solve your issue but you don't have to name your commands with name="test"
lol
The name will default to the function name
what line is that
Its after async def
oh
That is what the command name with be
Just remove the name parameter
ill keep it for now as im learning
alr
more readable
Not really
Anyone know if you can use async for back to back in the same command
Because it wont for me
water, why am i getting the errror though?
Im guessing you're watching a guide so i'd suggest finding a new one because this one is outdated
I:
Thats why its not working
If you have your Cog in the same file as bot
Just call bot.add_cog(someCommands(bot))
Why bother doing def setup
Yea
wdym back to back
Like just 2 different async for statements
any suggestions on what database library I should use for holding game data? like is sqlite3 good enough? or is there anything more tuned towards this (rpg game, stats based on member interactions in different channels)
Well it really depends. Go for either postgresql if u want an SQL db or Mongo if u want NoSQL db
nested functions?
if so, then yes you can nest as many functions as you want
what am i doing wrong?
two functions with the same name?
@maiden fable thank you for your response
(:
Oops, a typo. Fixed it
Lemme just send the code
async for msg in channel:
if hard_n in msg.content:
hard_n_counter += 1
async for msg in channel:
if soft_n in msg.content:
soft_n_counter += 1
These are inside a command
that works
any help
but why dont you do it inside a single for loop
what is channel
ok so what do you mean by "it doesn’t work"
wdym
not sure
uh
removes them
cuz ur using a single instance of an async iterator
just do everything in a single for loop
Is that possible because they're looking for 2 different words
ok so why does that matter
Idk just wondering
Technically, could I call a class straight from the main file?
yes?
Yeah it works now
who knows
Can you explain more why it didn't work when I had 2 separate statements?
explain your question with a code example
not sure
I started building the bot by the cog first
what???
Thing is, I'm too lazy now to declare it as a cog
So could I just slap the client.run and it's going to work normally?
i mean isn't declaring cog just add_cog()?
Alright, I'll just rephrase it
Why does this work instead?
I didn't write the main file yet, I started writing the Cog.py file with the commands and stuff
Thing is, I want to test the commands real quick, but I'm kinda too lazy to declare the Cog.py as a Cog and also write the Main file itself
Could I just merge those both in the same file and it's going to work normally?
its literally like 6 lines of code
well just execute setup function while passing a bot object
blanket halp
what is self.user
if you dont want to write the cog stuff your self just download a cog template and work from there
i think he's just testing a cog without executing everything else. I too do this. I make my cog be able to execute by itself
wdym by that?
Like, ive only used cogs my entire time making a bot, i dont know what you mean
like just open the cog file and it works as a bot by itself
this could be because ClientUser.mention is <@id>
but can i not just check if the message content starts with the mention?
and not hard coding the mention
yeah
if __name__ = '__main__':
bot = #make bot
setup(bot)
bot.run(token)
```Just add this at the end and it should work too
thats pretty cool
why run setup? import the class and call bot.add_cog
as i said, for debugging purposes so you don't have to keep editting main file when you want to just execute a specific cog
its like less than 10 lines to load all your cogs when you launch your main file
for file in os.listdir("Cogs"):
if file.endswith(".py"):
name = file[:-3]
if name != "music":
bot.load_extension(f"Cogs.{name}")```
legit this is all you need (you can ignore the music part, its for my own stuff)
what, all that setup does is call bot.add_cog
yes that's the point
so why not call it directly??
it's there, use it
call bot.add_cog directly
yeah the code is pretty weird but i'm used to adding test_cases in my modules too not just discord cogs. It execs when it's ran directly
you use pytest or unitest?
well no. Most modules i make doesn't return anything but instead does stuff like send files and it doesn't return anything
@commands.Cog.listener(name="on_message")
async def SelfPingResponder(self, ctx):
testing = self.bot.get_guild(755722576445046806)
embed = discord.Embed(title="Why you ping me?", color=EMBED_COLOUR,
description=f"My default prefix is `tp!`.\nIf a custom prefix was set and you dont know it, you can use my mention as a prefix!\nNormally, AGB's nickname is set to contain its prefix and it will update when the prefix is changed. If the bot doesnt have permissions to update its nickname, this feature will obviously not work. If there is no nickname thats set currently, please report this to an Admin or to {ctx.guild.owner.mention}\nExample on how to use my mention as the prefix:{self.bot.user.mention} prefix")
embed.set_thumbnail(url=ctx.author.avatar_url)
if ctx.author.bot:
return
if ctx.message.content.startswith("@wind axle"):
if ctx.guild.id == testing:
await ctx.channel.send(embed=embed)
else:
return
``` would this work blanket
try it
i dont like errors, cluttered console = bad console
wait you’re comparing an int to a Guild object
for testing purposes rn
dont want it to work globally until i know it works without issues
yknow
you can always close it
or clear it
os.system("cls") lol
dont know if it will work as intended though
Isn't that blocking? That blocks my bot
also how do you not have shell access
os.system()
Because i dont
U can instead use asyncio.create_shell_process or so idr
its a Pterodactyl shell
it can block sometimes
if the operation takes some time
i dont think clearing the console would be a very blocking operation
see what i mean @hasty iron
whats that type a command
It doesnt actually execute a shell command
wtf
f
try /help
ur mom
yus
i dont think so
if ctx.message.content.startswith("@wind axle"):```
advertisement
i don't think it worked lol
it worked for me too
wait is this expected lol
no for people who have mutual servers with it it'll show the ping
Ignoring exception in on_message
Traceback (most recent call last):
File "/home/container/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/container/Cogs/info.py", line 426, in SelfPingResponder
if ctx.message.content.startswith("@wind axle"):
AttributeError: 'Message' object has no attribute 'message'```
@hasty iron i legit dont understand
your Message object is named ctx
wouldnt that work?
Message.message doesn’t exist
well using ctx.content doesnt work either, so just remove ctx?
Get the ctx if you need it
no dont get it
i have it in the.. typehint thing
you have a Message object
(self, ctx) this part
typehint??
idk what its called
ur inside an on_message event
that's not a typehint
function
on_message returns message object not context
what error do i need to except if the contents was too big for the embed
is there even an error? iirc it just cuts it. but idk
ight nvm then, one sec
sorry that i vanished my mom brought home sushi
🍣
yes
God, what's wrong with this damn codes, I got sick of fixing mistakes all day
what the error says
you are missing a positional argument, somewhere in cogs.voice lmao
did you give it a source
not a great traceback
The photo shows:
def __init__(self, source: YTDLSource):
self.source = source
self.requester = source.requester
How to make a good one?
HTTPException
guess we know now
yeah don't pass HTTPException. It's probably important
I just don't understand what else he needs, there are always some mistakes
paste the whole traceback
also is there another __init__? Perhaps, it's not that
!ytdl
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)

See at this first screenshot at the very top
It's a bit cropped, but you can see the ytdl
what's the best practice for storing a bot's token? my bot is a private bot only meant to be used on one server, and i'm hosting it on a raspberry pi. the code is in a public github repo. right now i have the token in a separate python file that's listed in my .gitignore and i import the token into my main bot file to run it– is this secure enough? should i use a .env file instead?
if you're not posting your token to the repo you'll be fine
Yeah pretty much
I mean, as long as it's in .gitignore and not publicly available, it's alright.
alright sounds good, thanks all!
i can help u in dms if u want
btw @hasty iron should i just remove ctx? since ctx.content doesnt work would just message.content work?
or, should i have everything set as message?
I would be very grateful to you
@commands.Cog.listener(name="on_message")
async def SelfPingResponder(self, message):
embed = discord.Embed(title="Why you ping me?", color=EMBED_COLOUR,
description=f"My default prefix is `tp!`.\nIf a custom prefix was set and you dont know it, you can use my mention as a prefix!\nNormally, AGB's nickname is set to contain its prefix and it will update when the prefix is changed. If the bot doesnt have permissions to update its nickname, this feature will obviously not work. If there is no nickname thats set currently, please report this to an Admin or to the Owner of this server.\nExample on how to use my mention as the prefix: <@{self.bot.user.id}> prefix")
if message.author.bot:
return
if message.content.startswith("@wind axle"):
if message.guild.id == 755722576445046806:
await message.channel.send(embed=embed)
await message.channel.send("testing")```
please someone explain to me why this isnt working, its not sending a single thing
now = datetime.datetime.utcnow()
delta = now - afkvar[3]``` the afkvar[3] is the datetime in this pic
```py
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\49176\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Elly - Test Version\cogs\afk.py", line 131, in on_message
delta = now - afkvar[3]
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'str'```
https://cdn.discordapp.com/attachments/381965515721146390/886349188328202300/unknown.png
afkvar[3] is said to be a string. Where are you getting it from?
from my db
Your DB must not give it as a datetime object. You may need to parse it into one first.
but how
!d datetime.datetime.strptime
classmethod datetime.strptime(date_string, format)```
Return a [`datetime`](https://docs.python.org/3.10/library/datetime.html#datetime.datetime "datetime.datetime") corresponding to *date\_string*, parsed according to *format*.
This is equivalent to:
```py
datetime(*(time.strptime(date_string, format)[0:6]))
``` [`ValueError`](https://docs.python.org/3.10/library/exceptions.html#ValueError "ValueError") is raised if the date\_string and format can’t be parsed by [`time.strptime()`](https://docs.python.org/3.10/library/time.html#time.strptime "time.strptime") or if it returns a value which isn’t a time tuple. For a complete list of formatting directives, see [strftime() and strptime() Behavior](https://docs.python.org/3.10/library/datetime.html#strftime-strptime-behavior).
you should store the timestamp instead
and you wouldn’t have to worry about precision
and formatting
I’m getting stuck on this error anyone knows why?
async def help(self, ctx):
"""
Displays a useful list of commands.
"""
desc = ""
for key in self.bot.commands.keys():
command = self.bot.get_command(key)
if command.hidden and not checks.is_owner(ctx):
continue```
And I’m getting this error any idea why?
for key in self.bot.commands.keys():
AttributeError: 'set' object has no attribute 'keys'
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.10/glossary.html#term-hashable). To represent sets of sets, the inner sets must be [`frozenset`](https://docs.python.org/3.10/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'])`...
Ok thank you
make your own
discord.py already has all the http routes added
you just have to add models and that’s it
Any idea what to change on that script. I’m making a mess of things
Just remove the .keys().
And it is a set of command objects. You don't need to fetch the command afterword
I’ve tried that
I can't figure out how to change a channel description. Can anyone advise?
discord.TextChannel has a attribute topic, use that to change it
👍
@commands.command()
async def blah(self, ctx):
#cmd stuffs
@blah.error
async def blah_error(self, ctx, error):
#error handler```
I use error handlers like this for every specific commands, now my question is if i define a on_command_error event will it overwrite all these error handlers?
Yes
Then no, it shouldn't
Ok I'll try that if it works this way
!pypi aiosqlite
how would i write this for an addrole "You cannot add a role higher then your top role to yourself!"
member == [?]
what would i put there
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
@client.command()
@commands.has_permissions(manage_messages = True)
async def addrole(ctx, role: discord.Role, member: discord.Member):
guild = ctx.guild
await member.add_roles(role)
await ctx.send(f'I succesfully added role {role} to {member}')
###########################################################################################################################
if member == guild.owner:
return await ctx.send("You can't give roles to the server's owner!")
if member.top_role > guild.me.top_role:
return await ctx.send(f"This member's top role is higher than yours!\n\n{member.top_role.name} <-- {member.mention}'s top role\n\n{ctx.author.top_role.name} <-- Your top role")
if member.top_role > ctx.author.top_role or member.top_role == ctx.author.top_role:
return await ctx.send("You cannot give roles to someone with a higher or equal role to you!")
if member.top_role == guild.me.top_role:
return await ctx.send("This member's top role is equal to your top role!")
if member == ctx.author:
return await ctx.send("You cannot add a role higher then your top role to yourself!")
would it be
if member == ctx.author.top_role:
UPDATE subscriptions SET nitro = true WHERE userId = 763854419484999722
role has a position attribute
what dat mean
Alright, I have some objects as follows:
class CustomGuild(Guild):
def __init__(self, instance):
self._instance = instance
def __getattr__(self, name):
return getattr(self._instance, name, None)
class CustomContext(commands.Context):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.cguild = CustomGuild(self.guild)
I try to implement it like such:
context = await self.client.get_context(message, cls=CustomContext)
await self.client.invoke(context)
But I've got a weird problem, to say the least.
In my commands, the Context object gets passed as CustomContext, but when I try to access the cguild attribute, an attribute error is raised saying that the Context object doesn't have that, but ctx shouldn't be a Context object, and if I print the type, it's labeled as a CustomContext.
Despite an AttributeError saying there is no attribute called cguild, cguild is still actually an object, and I can call the methods and attributes from it. I'm not sure what I'm doing wrong here, why is an error being raised despite the code (seemingly) working?
Can you show the command signature where you are using your custom context?
Does this mean you are seeing a type error on your IDE or does it actually raise the error
On mobile, one second,
And it's actually raising an error.
How do i make a embed have a click able link
just put a link in the embed it should work
Show the code
alr 1 sec
Hey @slate swan!
It looks like you tried to attach a Python file - please use a code-pasting service such as https://paste.pythondiscord.com
should be commands.Bot()
it worked
thanks
i get this but thats not the mesage i wanted to be
i did $help which is ment to print
{Fore.BLACK}|| hells Corp discord bot
{Fore.BLACK}|| made by el pacho
{Fore.BLACK}|| published by el pacho
{Fore.BLACK}||this is el pachos slave
{Fore.BLACK}||current commands are:
{Fore.BLACK}||$help
{Fore.BLACK}||$cum
{Fore.BLACK}||$nitro
{Fore.BLACK}||$discord
{Fore.BLACK}||$mod
-----------------------------------------
{Fore.BLACK}|| hells Corp discord bot
{Fore.BLACK}|| made by el pacho
{Fore.BLACK}|| published by el pacho
{Fore.BLACK}||this is el pachos slave
{Fore.BLACK}||current commands are:
{Fore.BLACK}||$help
{Fore.BLACK}||$cum
{Fore.BLACK}||$nitro
{Fore.BLACK}||$discord
{Fore.BLACK}||$mod
-----------------------------------------```
its ment to print this
but instead of the Faore.black its ment to show smt else
anyone know a fix
When I run this
@commands.Cog.listener()
async def on_member_join(self, member: discord.Member):
channel = self.bot.get_channel(884131769673203772)
print("Member join: {member}")
if not channel:
return
await channel.send(f"Welcome, {member} be sure the read our rules!")
Nothing happens i dont event get a print in terminal
Why is it not workin
did you enable intents?
mhm
wait hang on
Yep still dose not work
I have member intent and intent
It has admin perms
And its not workin
maybe try this? ```py
@commands.Cog.listener()
async def on_member_join(self, member):
channel = self.bot.get_channel(884131769673203772)
print("Member join: {member}")
if not channel:
return
await channel.send(f"Welcome, {member} be sure the read our rules!")
commands.remove("help")
hm
but it doesnt hurt to try
!code
its client.remove("help")
oh sorry
how do you test like quick code with the python bot again?
Hey guys 
I'm working on a bot for my Axie Infinity scholars and I'd like to post messages in a channel, but in alphabetical order based off of their names
I created the class Scholar and have the scholar objects below. I'd like a function to sort by their name parameter and then run the functions to post message updates:
class Scholar:
def __init__(self, name, API, ronin, discordID, embedColor, manager, scholarNumber, joinDate):
self.name = name
self.API = API
self.ronin = ronin
self.discordID = discordID
self.embedColor = embedColor
self.manager = manager
self.scholarNumber = scholarNumber
self.joinDate = joinDate
def getDataSendMessages():
print(test)
#Example Scholar Object
mattScholar_1 = Scholar("Camilla", "https://apiTest=000000000000000000000",
"ronin:000000000000000000000",
11111111111111111,
0x7289da,
"Matt",
"1",
"August 10th, 2021")
#Function Example
@tasks.loop(minutes = 60)
async def sendScholarMessages():
testBotChannel = client.get_channel(796021873733009449)
#THESE below are what I'd like to get sorted based on the scholar's names :)
await mattScholar_1.getDataSendMessages()
await mattScholar_2.getDataSendMessages()
await mattScholar_3.getDataSendMessages()
didnt work
!e
n = 10
while n > 0 :
print(n)
n = n – 1
print('Blastoff!')
print(n)
!e
@commands.Cog.listener()
async def on_member_join(self, member):
channel = self.bot.get_channel(884131769673203772)
print("Member join: {member}")
if not channel:
return
await channel.send(f"Welcome, {member} be sure the read our rules!")
@vale root :x: Your eval job has completed with return code 1.
001 | File "<string>", line 2
002 | async def on_member_join(self, member):
003 | IndentationError: unexpected indent
you cant do that with that
i think its cuz of your @commands.Cog.listener() not indented
Nope
it's probably because @commands.Cog.listener() is not indented
basically what i just said
check the line before than then
How can Iget the total number of commands
print(len(bot.commands))
maybe
not sure
git rm -rf /
gives you free verified bot
do you have member intents
Prob not gonna hop on PC again tonight but the command is templated.
How would I get a list of every member in the discord?
I want to create an anti-raid bot since my discords are getting raided a lot even with maximum security on discord. So I figured if I could just type a command like !raid and ban anybody who has recently joined and has a new account it'd be easier than manually removing them.
And one of the things I'd need is a list of every member in the discord. So how would I do that?
!d discord.Guild.members
members```
A list of members that belong to this guild.
Thanks
Need help!
This is my code but i get this error:
**line 10 async def join(self,ctx)
^
@commands.command()
async def join(self,ctx):
if ctx.author.voice is None:
await ctx.send("You are not in a voicec hannel")
voice_channel = ctx.author.voice.channel
if ctx.voice_channel is None:
await voice_channel.connect()
else:
await ctx.voice.channel.move_to(voice_channel)
Are you using python 3
ERROR
line 10 async def join(self,ctx)
^
IdentationError: Unexpected indent
@slate swan your code isn't properly indented if that's your actual code 🤔
but now its error in line 20,wait i will send @vagrant brook
nah it isnt mine,its my best friends code hehe
@commands.command()
async def disconnect(self,ctx):
await ctx.voice_client.disconnect()
@commands.command()
async def join(self,ctx):
if ctx.author.voice is None:
await ctx.send("You are not in a voicec hannel")
voice_channel = ctx.author.voice.channel
if ctx.voice_channel is None:
await voice_channel.connect()
else:
await ctx.voice.channel.move_to(voice_channel)
tnx
fixed indentations in first code.
He's using 2 spaces indentation
there's a special place in hell for 2 space indentations
bruh
now we got more errors ):
def setup(client):
client.add_cog(music(client))
last line
it says its a error but we can't indentify where
I don't deal with the music/voice part so I wouldn't know
What's the error exactly?
Press ctrl +z
Ctrl+z = undo.
Ctrl+y = redo
at any rate @slate swan, fix your indentations..
def setup(client):
client.add_cog(music(client))
well back to the error
discord.Client does not have cogs, you need commands.Bot
!d discord.ext.commands.Bot
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/stable/api.html#discord.Client "discord.Client") and as a result anything that you can do with a [`discord.Client`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Client "discord.Client") you can do with this bot.
This class also subclasses [`GroupMixin`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.GroupMixin "discord.ext.commands.GroupMixin") to provide the functionality to manage commands.
Use this, not discord.Client, yea
soo,what should i do?
Nothing wrong using 2 space indentation, it won't cause any errors. Its just preference its better not to mix two indentation styles. Anyways you could at least try to be helpful lmao
i dont understand really
Curl up into the fetal position in the corner, rock back and forth slowly, and slowly cry.
.......
wtf
Currently your client is defined as discord.Client you want to switch that to commands.Bot, this is a class that inherits discord.Client so a few things are different. Your gonna want to check out a guide
Checkout this tutorial
A tutorial on how to use discord.py to create your own Discord bot in Python, written to fix the flaws of many other popular tutorials.
but i dont have discord.client anywhere in my script...
soo,i should write commands.Bot instead discord.Client? Right?
Yes
It should be in your main bot file, not your cog file
Yea
Haha I know that feeling
Are there any legitimate ways to create a music playing bot?
you ought to declare a prefix
set the command prefix
whether through your config file or manual
command_prefix="#" Or something
for example I have:
bot = commands.Bot(
conf.get("prefix", "!"),
activity=discord.Activity(
name="Leothelion", type=discord.ActivityType.streaming
),
)
Or u can do just "#"
Well, they are new to the commands.Bot class
i'd love to send a link to the documentation but apparently that is against code of conduct
so i'm going to just give examples
Well, I would prefer Alec's tutorial
witch line should the prefix be?
Nonono. U r doing the cogs wrong
):
In the Bot("#")
also naming commands.Bot as Client is going to be awfully confusing
i give up
Hey @slate swan, I prefer u go to the website I posted above and look into that tutorial. That will help you get an understanding of the basics of the dpy library
tnx
okeyyy
but anyways
no errors now
so i think it will work'
well okey ):
is there a reason this doesn't work or does close just not work with cogs? python @commands.Cog.listener() async def close(self) -> None: print(f"[EXIT ] Shutting down...") self.bot.save() await self.bot.close()
y did u define client 2 times?
so u mean that line 17 and line 6 is basically same shit or? 🙂
idk,im new,im programming this bot with my best friend
what do you think?
remove the one in line 6 and move the one in line 17 to line 6
like i said,im new
new to what
i think hes new to coding
now i got like 3 errors heh haha
@slate swan Also make the "Client" lowercase :)
if ur new to dpy just make the commands all in one folder lol
Also, why not instead loop over the list elements instead of range?
U r doing range(len(cogs))
But why not do cogs
helps to read the documentation that describes and lists all the available args
but i can't link it
against CoC
This all can be a bit too much since u r just a beginner, so I seriously suggest you to look into some OOP and checkout that tutorial I have sent twice
mhm object orienting programming
Because that wouldn't work
!d discord.ext.commands.Cog it's not against CoC as long as u r explaining the things alongside.
class discord.ext.commands.Cog```
The base class that all cogs must inherit from.
A cog is a collection of commands, listeners, and optional state to help group commands together. More information on them can be found on the [Cogs](https://discordpy.readthedocs.io/en/stable/ext/commands/cogs.html#ext-commands-cogs) page.
When inheriting from this class, the options shown in [`CogMeta`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.CogMeta "discord.ext.commands.CogMeta") are equally valid here.
Eh?
nah i was told off in the past for being "dismissive"
!e ```py
cogs = [1]
for i in range(cogs):
print(i)
@pliant gulch :x: Your eval job has completed with return code 1.
001 | Traceback (most recent call last):
002 | File "<string>", line 3, in <module>
003 | TypeError: 'list' object cannot be interpreted as an integer
I mean
i'm not going to argue with the moderators
Removing the range also and looping over the elements
Eh, it's fine. You can link the documentation as long as u r helping people understand that specific class
that's what I thought i was doing, but obviously we have no power to make that call
anyway
Yea nvm
if you don't have many cogs to add, you can just
bot = commands.Bot(<args>)
bot.add_cog(<cog name and params>)
in your case bot would be client
Yea
Wait no
!d discord.ext.commands.Bot.load_extension this is used for loading the cogs
load_extension(name, *, package=None)```
Loads an extension.
An extension is a python module that contains commands, cogs, or listeners.
An extension must have a global function, `setup` defined as the entry point on what to do when the extension is loaded. This entry point must have a single argument, the `bot`.
oh? i use add_cog
It doesn't load the cogs. I prefer u use load_extension
that is good to know
i presumed cogs are loaded at the stage when you do bot.run("token")
thanks for the info
the same way you'd hate riding a car without knowing how to change gears
Indeed
But it’s funny to create something creative
Well Volle. What you are doing is, tryna drive a car when you don't know how to drive it. That's the same thing that's happening to you.
I prefer you learn the basics first and then go for Cogs as this is an advanced part of the library.
I have linked that tutorial which will make u understand OOP and the basics of the library, then you can go for Cogs (that tutorial also tells how to use Cogs BTW)
Mhm true
Yeah I saw that,
I started reading it,but I’m so tired right now so I have to go.
Well that's okay. Have a good night!
Godnight
How can I add to the commands that certain permissions are required?
!d discord.ext.commands.has_permissions
discord.ext.commands.has_permissions(**perms)```
A [`check()`](https://discordpy.readthedocs.io/en/stable/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/stable/api.html#discord.Permissions "discord.Permissions").
This check raises a special exception, [`MissingPermissions`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.MissingPermissions "discord.ext.commands.MissingPermissions") that is inherited from [`CheckFailure`](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.CheckFailure "discord.ext.commands.CheckFailure").
This?
or you could check if the person has a specific permission in the command
@client.command()
async def userinfo(ctx, member: discord.Member = None):
target = member
embed = discord.Embed(
title=f"User Information",
color=0x00a8ff,
timestamp=datetime.utcnow())
embed.set_thumbnail(url=member.avatar.url)
fields = [("Name", str(target), True),
("ID", target.id, True),
("Bot?", target.bot, True),
("Top Role", target.top_role.mention, True),
("Status", str(target.status).title(), True),
("Activity", f"{str(target.activity.type).split('.')[-1].title() if target.activity else 'N/A'} {target.activity.name if target.activity else ''}", True),
("Account Made", target.created_at.strftime("%m/%d/%Y %H:%M:%S"), True),
("Joined Server", target.joined_at.strftime("%m/%d/%Y %H:%M:%S"), True),
("Boosting?", bool(target.premium_since), True)]
for name, value, inline in fields:
embed.add_field(name=name, value=value, inline=inline)
await ctx.send(embed=embed)``` How can I make this check if the user is none/if the user isn't none?
It's that, but how do I make the bot say something like, "You don't have permissions to run the command. Missing permissions: Manage messages.

if member:
make embed
else:
raise ...
?
Thank you!
!discord discord.MessageEmbed
How can I divide these files into folders inside the cogs folder and still have the bot keep taking those files?
how can i make embed message?
for example i have a folder called modules that contain multiple cogs, one of which is called webscraping and inside it there is a file called arxiv.py where the class Arxivfetch exists. With this sort of structure, you just need to do:
from modules.webscraping.arxiv import Arxivfetch
in the main file
!d discord.Embed
class discord.Embed(**kwargs)```
Represents a Discord embed.
`len(x)` Returns the total size of the embed. Useful for checking if it’s within the 6000 character limit.
Certain properties return an `EmbedProxy`, a type that acts similar to a regular [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.9)") except using dotted access, e.g. `embed.author.icon_url`. If the attribute is invalid or empty, then a special sentinel value is returned, [`Embed.Empty`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Embed.Empty "discord.Embed.Empty").
For ease of use, all parameters that expect a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") are implicitly casted to [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.9)") for you.
!d discord.Embed.add_field
add_field(*, name, value, inline=True)```
Adds a field to the embed object.
This function returns the class instance to allow for fluent-style chaining.
🤔
you use the discord.Embed class to create an embed
and you can add fields by using add_field
there's also things like set_thumbnail, set_footer, set_image etc
I still do not understand
excuse me
point is if you want to use folders, you need to have __init__.py in them
so that they are treated as packages
and what should go inside that file?
you can leave it empty
oh
so now if i can add this right?
well that depends on how your directories are set up
So
Don't judge me
But how do I code a bot that chooses a random person that reacted a certain reaction to the bots command?
(I use replit, just bc it has 24/7)
ModuleNotFoundError: No module named 'Dryfile'
What exactly is this error? I'm trying to declare a cog
I've tried pip updating, but it's still weird
DryFile is just a name, don't worry
is dryfile in another directory?
It's on the cogs folder, but I've listed it
if filename.endswith('.py'):
bot.load_extension(f'cogs.{filename[:-3]}')```
U need to use on_command_error and check for Missing Permissions error
yeah but if you have a class named Dryfile in dryfile.py then you shuold be importing like
from dryfile import Dryfile
Is there a place where I can see the list of all the datetime timezones?
Like this?
Kinda, py timestamp=datetime.utcnow()) I just wanna change this timestamp to my timezone (Mountain Standard Time)
I remember reading about this on the import time documentation, lemme see if I can retrieve it
!pypi tzlocal
You just want a list of timezones like this?
I just wanna change this timestamp to my timezone (Mountain Standard Time)
i thought this was the primary intention
Vs code doesn't seem to register these imports for some reason
Kinda, but for datetime.
have you installed tzlocal through your python package manager?
No, how do I do that? 😂
depends, are you using conda or pip?
pip
then do pip install tzlocal
How do I write like that
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: Forbidden: 403 Forbidden (error code: 60003): Two factor is required for this operation
how do i fix this
So, I was messing aroung with regex (probably in the wrong way) trying to make something similar to Rollem dice system. It was working until I noticed it wasn't. Basically whenever I run any number of dices diferent than 1 (Ex: 3d20) it will run the command twice.
My command:
@commands.command()
async def r(self, ctx: commands.context.Context, roll):
dice_pattern = r'(\d+|)d(\d+)(\+\+\d+|\-\-\d+|\d+|[\+\-]\d+|)'
if re.match(dice_pattern, roll):
vals_list = []
modif_list = []
sep = re.search(dice_pattern, roll)
times = int(sep.group(1)) if sep.group(1) != '' else 1
value = int(sep.group(2))
modif = sep.group(3) or 0; mod = f'{modif[0]} {modif[1:]}' if modif != 0 else ''
if times >= 100 or value >= 100000:
await ctx.reply('A quantidade de dados não deve passar de 100000.')
return
for i in range(times):
gen = randint(1, value)
vals_list.append(gen)
modif_list.append(f'{gen}+{modif}')
if re.match(r'(\d+|)d(\d+)([\+\-]\d+|)', roll):
result = eval(f'{sum(vals_list)}+{modif}')
else:
result = eval("+".join(modif_list))
print(modif_list); print(vals_list); print(result)
await ctx.reply(f'{result} ⟵ {sorted(vals_list, reverse=True)} {times}d{value} {mod}')
Ahh, ty
have you tried debugging with print statements?
Maybe replace message.channel.purge(limit=1) with message.delete()
Then it's a permission problem?
Can embed.set_author not be in order like embed.set_author(icon_url=..., text=... like this?
Oh my god sorry
Read what you sent
in a while is an understatement
It will be gone, then?
For example, to mention me using code you'd have to send @brazen raft
It's no longer maintained by its developer
Or just author.mention
He wants to mention himself
Wait @hollow iron what's e
e = message.author
e = message.author
<@672580539513045013> certainly works
message.author.mention
i thought they wanted the bot to ping the owner (assuming it's them) and not the author
His
await message.channel.send('<' + '@Vaprant#7777' + '>' + ' Bruh, did ' + e + ' really just try that?, don' + "'" + 't worry, hes banned lol!')
Mine
await message.channel.send(f"@hollow iron Bruh, did {e} really just try that? Don't worry, he's banned lol!")
``` why not make it like this
how do i get it to ping me and say the author in ...
right
ping both you and the author
@hollow iron response?
yeah the lack of f-strings really makes it hard to read the code
That's what I thought lol
Formatting strings
!f-string
Creating a Python string with your variables using the + operator can be difficult to write and read. F-strings (format-strings) make it easy to insert values into a string. If you put an f in front of the first quote, you can then put Python expressions between curly braces in the string.
>>> snake = "pythons"
>>> number = 21
>>> f"There are {number * 2} {snake} on the plane."
"There are 42 pythons on the plane."
Note that even when you include an expression that isn't a string, like number * 2, Python will convert it to a string for you.
i mean it's not wrong either but it's just hard to read
both works
And now I got a different error
I got something right, atleast
TypeError: 'module' object is not callable```
What exactly is this?
commands.Bot
oops
You can use " " or ' '
I genuinely don't know if I should laugh or cry
Some people have an f string addiction 😔
It's like whenever I tap an error, another appears
discord.ext.commands.errors.ExtensionFailed: Extension 'Cogs.DryFile' raised an error: TypeError: cogs must derive from Cog```
How can I fix this?
Show your code
Cog or Main?
Basically, your cog class should inherit from commands.Cog
like me
Then I should replace my classes with Commands.Cog, got it
Use message.author.name
try? ```py
await message.channel.send(f"@hollow iron Bruh, did {message.author} really just try that? Don't worry, he's banned lol!")
<@{message.author.id}>
hes trying to mention him self not the author
wut
hes tryna mention the guy that triggered the filter
Can someone check this code and see if I've made any fatal mistakes? For example it won't work as I think it would?
@client.command()
async def raid(ctx):
memberslist = []
for i in client.guilds:
for member in i.members:
joineddate = datetime.now() - member.joined_at
createddate = datetime.now() - member.created_at
if joineddate.days <= 1 or createddate.days <= 1:
mymembers = {
'Member name:': member,
'Member id:': member.id,
'Member roles:': member.roles,
'Created:': member.created_at,
'Joined:': member.joined_at
}
memberslist.append(mymembers)
member.kick('Kicked due to anti-raid procedures. If you believe this is in error, please contact our staff. <List of staff>')
#await member.send('You have just been kicked due to our anti-raid procedures. \n If you believe this is in error, please contact our staff. <List of staff>')
memberslist_string = '``` **Kicking these members:**\n\n'
for i in memberslist:
for a,b in i.items():
memberslist_string += (f'{a} : {b} \n')
memberslist_string += ('\n')
memberslist_string += '```'
await ctx.send(memberslist_string)
At the moment I dont have any test subjects so I can't exactly determine if it will work.
how can i make a command that enables an on_message(message) function 60 seconds after the command gets sent? i need to have a few commands that start various games, and when a game is started, 60 seconds later it needs to start the on_message(message) function for that game only, then after the game is complete or after 5 minutes of inactivity it should stop the function and allow commands again
Wouldn't you use a separate command sheet for each game?
load them up. so you might do $load Quizzer
Also only allow your bot to handle 1 game at a time.
well thats basically what i want?
i want it to, in that channel or server (either or), only allow one game at a time to be started
but i dont want users to need to type a command for every single game
am i best to make like a state machine of some kind that updates to the "id" of the game and make a thing that only allows command to be processed in non-active channels?
and only processes non-command messages in their respective channel?
how do I make a bot print when a command is used
print or send a message?
either way, your question makes it seem like you dont understand teh basics
so like it would say the command ... was just run
I do
and some more advanced stuff to
to send it would be ctx.send
to the terminal yes
@client.command()
async def test(ctx):
await ctx.send("test complete")
this will send a message

but again, this is like the basics of a discord bot
not like that
when any command is run not just printing is there not an event
any command?
yes
hi, any idea how i get this:
https://retarded-people.online/ (first screenshot underneath code)
to this:
https://retarded-people.online/ (second screenshot)
This is the code:
@commands.command()
async def userinfo(self, ctx, member: discord.Member = None):
member = ctx.author if member is None else member
roles_string = ', '.join([r.mention for r in reversed(member.roles[1:])])
permissions_string = ', '.join([str(p[0]).replace("_", " ").title() for p in member.guild_permissions if p[1]])
e = discord.Embed(
colour=0xFCA41C,
title=member
)
e.set_thumbnail(url=member.avatar_url)
e.add_field(name=f'Joined at', value=member.joined_at.__format__('%A, %d %B %Y @ %I:%M:%S %p '))
e.add_field(name=f'Registered at', value=member.created_at.__format__('%A, %d %B %Y @ %I:%M:%S %p '),
inline=False)
e.add_field(name=f'Roles [{len(member.roles[1:])}]', value=roles_string, inline=False)
e.add_field(name=f'Key Permissions', value=permissions_string, inline=False)
e.set_footer(text=f'ID: {member.id}')
await ctx.send(embed=e)
what is it you wanna do?
I want to make it so the first key permissions is the same as the second one, as in screenhots
image link
but could someone answer the question
try this?
I found an event in the docs that fits my needs thank you though
np
but i cant seem to figure it out
!code
Here's how to format Python code on Discord:
```py
print('Hello world!')
```
These are backticks, not quotes. Check this out if you can't find the backtick key.
if member == guild.owner:
return await ctx.send("I cannot ban the server's owner!")
if member == ctx.author:
return await ctx.send("You cannot ban yourself!")
if member.top_role > guild.me.top_role:
return await ctx.send(f"This member's top role is higher than yours!\n\n{member.top_role.name} <-- {member.mention}'s top role\n\n{ctx.author.top_role.name} <-- Your top role")
if member.top_role == guild.me.top_role:
return await ctx.send("This member's top role is equal to your top role!")
how do i write more then one "if"?
like if one of them doesnt work then to try the next one? if that makes sense lmfaoo
literally use an elif
ok
so its
if thing == thing:
stuff
elif thing == thing2:
stuff
else:
exception code stuff
Anyone?
Also,
I've noticed that my Main file doesn't notify my terminal that the bot is online, even though i'm printing it
for an "addrole" script how would i write something for if the role was too high to be given?
Pasting large amounts of code
If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/
After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.
Anyway, my main file doesn't notify anything through the terminal. https://paste.pythondiscord.com/dazuxucivi.py
I'm going to sleep now, so I'd appreciate if you could ping me with the answer so I can search for it later
check whether the role indicated is higher than teh bots highest role?
if roleIndicated >= bot.top_role:
do code stuff here
hi, any idea how i get this:
https://retarded-people.online/
(first screenshot underneath code)
to this:
https://retarded-people.online/
(second screenshot)
This is the code:
@commands.command()
async def userinfo(self, ctx, member: discord.Member = None):
member = ctx.author if member is None else member
roles_string = ', '.join([r.mention for r in reversed(member.roles[1:])])
permissions_string = ', '.join([str(p[0]).replace("_", " ").title() for p in member.guild_permissions if p[1]])
e = discord.Embed(
colour=0xFCA41C,
title=member
)
e.set_thumbnail(url=member.avatar_url)
e.add_field(name=f'Joined at', value=member.joined_at.__format__('%A, %d %B %Y @ %I:%M:%S %p '))
e.add_field(name=f'Registered at', value=member.created_at.__format__('%A, %d %B %Y @ %I:%M:%S %p '),
inline=False)
e.add_field(name=f'Roles [{len(member.roles[1:])}]', value=roles_string, inline=False)
e.add_field(name=f'Key Permissions', value=permissions_string, inline=False)
e.set_footer(text=f'ID: {member.id}')
await ctx.send(embed=e)
How to make so a member can't type in a channel? Like how to change the channel permissions?
mute
Like channel.edit(permissions=...)
no in the discord
Hey @crude crater!
Uh-oh! It looks like your message got zapped by our spam filter. We currently don't allow .txt attachments, so here are some tips to help you travel safely:
• If you attempted to send a message longer than 2000 characters, try shortening your message to fit within the character limit or use a pasting service (see below)
• If you tried to show someone your code, you can use codeblocks
(run !code-blocks in #bot-commands for more information) or use a pasting service like:
omg
no need
quick question im too lazy to test
if a role has manage_roles perm can it remove administrator from a role below it?
no
so only roles with administrator can change other role's permission to have administrator
?
yes
ok
does someone have a banned/blacklisted words script?
script?
How to use permissionoverwrite?
yes?
whats a script
for a discord bot?
what lmao
u mean free code
huh?
Dont giveaway code.
🤦♂️
it isnt?
It is
why would it be?
it is infact a big deal
why lol
its literally not, we have starving kids in liberia and nuclear war you think someone getting free code is a big deal?
mhm
crazy lmaoo
ikr
its such a minute thing, average life expectancy is 85 years and you're gonna get hung up on numbers and letters? it really ISNT that big of a deal
<3
it is babe <3
i thought i was in some other channel for a second
unfortunately its not :D
it is :D
elaborate
why is it a big deal?
What's even the correlation
because i asked for a script and they made an ordeal about it lol
i really dont see how lmao
It's like asking for free lunch
its not
It is
its like asking for free code
I just arrived. How big is this code he's asking for @cyan nest ? 🤔
Rule 7. @crude crater
Word blacklisting
oh
why make it seem like its like im asking for an entire bot or something lol
its a simple command lmao
Why don't you code it yourself
^
Exactly
What are this discords rules on advertising your own job services? Coz I'd make it for him for a fiverr 😉
Turns out, these commands do take time to make
well idc but someone else will
And most spend hours on building them
And you come and ask to them simply hand it over
thats what im gonna have to do now but im stoned at 3 am and its so much work
Oh lord and the testing upon testing and then the error checking and then trying to catch as many edge cases as possible ;-;
and then simply say no
Then sleep, recover and code it yourself
bro why are yall so AR lmao
whats AR
How would you feel if you spent hours on building something nice
cant say in here lol
And somebody just says "hand it over"
idc, id give them the code
Nice, we don't
thats spoonfeeding
Good luck on your search
mmm.. spoons..
because they're gonna get good use out of it and its a simple thing just to do
If it's a simple thing
and not doing it gets nothing done for nobody
Why don't you do it yourself
i mean its a simple thing just to give it over lol
very simple really just use on message event
Stop saying it's simple when it's not lol
it really is
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
You can do it, I believe in you
what did you think i was gonna do if yall said no lmao
It's just a simple command
But we're saying no
if someone has knowledge of a publicly available resource that contains common swearwords and/or knows of a library that provides them in some way, that would suffice? or does that break a rule?
can yall like just let it go?
nah your giving him shit
its not a channel for "just talking" its for help
noone wants to research and write out like 100+ possible swear words or slurs
and when i asked for help i got a lecture
yes exactly dude
Help ≠ Ask for free code
if theres a premade list taht already exists publicly whats the problem in linking it, or if someone already made one they were willing to share whats the issue there?
A term used to refer to a person who feels a need to be in control of all aspects of his or her surroundings. Or, in other words, an anal retentive person "can't let go of shit."
AR= anal retentive
because you asked so nicely
o ok
because instead of a "no" i got a "iTs sUcH a bIg dEaL"
We literally told you no but you literally started saying that it's a big deal or whatnot
↑
