#discord-bots
1 messages · Page 725 of 1
im saying youre fetching or getting a member object for no reason
if ctx.guild is not None, ctx.author will be a member object
as you have done ctx.guild
your command wont work in dms
what you will get is an AttributeError
` cd /home/fazeexotic224/Wicked ; /usr/bin/env /bin/python3 /home/fazeexotic224/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/launcher 42139 -- /home/fazeexotic224/Wicked/main.py
File "/home/fazeexotic224/Wicked/main.py", line 15
^
SyntaxError: unexpected EOF while parsing`
How can you list all of the servers that the bot is in? Or would that require one of the intents? I'm trying to stay away from intents as much as possible.
!d discord.ext.commands.Bot.guilds
property guilds: List[discord.guild.Guild]```
The guilds that the connected client is a member of.
And it does not require any privileged intents so you can use it freely
Don't use the ▶️ button to run your code in vsc , use the run option above and select run without debugging
kk
Bruh
It is if i remove the input filed line
Hm? Really?
because the indentation is wrong
!indent
Indentation
Indentation is leading whitespace (spaces and tabs) at the beginning of a line of code. In the case of Python, they are used to determine the grouping of statements.
Spaces should be preferred over tabs. To be clear, this is in reference to the character itself, not the keys on a keyboard. Your editor/IDE should be configured to insert spaces when the TAB key is pressed. The amount of spaces should be a multiple of 4, except optionally in the case of continuation lines.
Example
def foo():
bar = 'baz' # indented one level
if bar == 'baz':
print('ham') # indented two levels
return bar # indented one level
The first line is not indented. The next two lines are indented to be inside of the function definition. They will only run when the function is called. The fourth line is indented to be inside the if statement, and will only run if the if statement evaluates to True. The fifth and last line is like the 2nd and 3rd and will always run when the function is called. It effectively closes the if statement above as no more lines can be inside the if statement below that line.
Indentation is used after:
1. Compound statements (eg. if, while, for, try, with, def, class, and their counterparts)
2. Continuation lines
More Info
1. Indentation style guide
2. Tabs or Spaces?
3. Official docs on indentation
ctx.guild is None if the command was not invoked in a guild
looks like you're trying to get rid of a database, which you really shouldn't
store the data in database where the key would be the user id
Just wondering, who does the hidden kwarg in the command decorator restrict from using the command?
Would it be everyone except the owner and people the people passed in to the owner_id kwarg in the bot constructor?
inlines
you need to do something there
@slate swan
you can use an embed visualiser to see it
Im getting an indentation error but I dont understand why if everything is indented correctly
@client.command()
async def cher(ctx):
embed = discord.Embed(
title = 'Cherry Network',
description = "The Cherry Project is a Decentralized Autonomous Organization developing a layer one blockchain network optimized for data operations.",
colour = discord.Colour.orange()
)
embed.add_field(name='sapo', value='sapo', inline=False)
await ctx.send(embed=embed)```
Nevermind
How do I do something like this?
import discord
import os
from discord.ext import commands
bot_1 = commands.Bot(command_prefix=">", help_command=None)
bot_2 = commands.Bot(command_prefix="?", help_command=None)
@bot_1.event
async def on_ready():
print(f"Sucessfully logged in as {bot_1.user}")
@bot_2.event
async def on_ready():
print(f"Sucessfully logged in as {bot_2.user}")
bot_1.run(os.getenv("DISCORD_TOKEN_MAIN"))
bot_2.run(os.getenv("DISCORD_TOKEN_SUB"))
I want these two bots to work synchronously, how do I run two bots in a single program?
How can I add an input field without a title?
embed.add_field(name='', value='https://www.cherry.network/', inline=False)
Give me an error unles I add something in name
@client.command(aliases = ["911"])
async def emergency(ctx):
channel = ctx.guild.get_channel(828004847574843482)
voice = await channel.connect()
def convert_to_audio(text):
my_audio = gTTS(text)
my_audio.save('hello.mp3')
convert_to_audio(f"Incoming call from {ctx.author.display_name} saying {ctx.message.content}")
def my_after(finish):
coro = voice.disconnect()
fut = asyncio.run_coroutine_threadsafe(coro, client.loop)
try:
fut.result()
except:
# an error happened sending the message
pass
source = FFmpegPCMAudio("hello.mp3")
player = voice.play(source, after=my_after)```
hey guys, how would i make the channel be different if the command channel id was a specific id?
embed.add_field(name='\u200b', value='https://www.cherry.network/', inline=False)
``` \u200b is an invisible character
@client.command()
async def cher(ctx):
embed = discord.Embed(
title='Cherry Network',
description="The Cherry Project is a Decentralized Autonomous Organization developing a layer one blockchain network optimized for data operations.",
colour=discord.Colour.orange()
)
embed.add_field(name='sapo', value='sapo', inline=False)
await ctx.send(embed=embed)```
press tab instead of space next time
its not a good practice
loop = asyncio.get_event_loop()
loop.create_task(bot1.start("TOKEN1"))
loop.create_task(bot2.start("TOKEN2"))
loop.run_forever()
It runs forever? Even though I leave my coding site?
Depends of the site
how
no. It just means the loop will continue to run until you stop it
Oh
from buttons without reply
How to make your bot run forever without been on the coding environment
A vps
use a hosting site
Which one
or that
A vps
What is. avps
there are many, i use vultrr
virtual private server
A vm that’s hosted by someone
You usually pay for them.
u cld use replit if u want free
now someone tell me about interaction failed thing in buttons
Definitely don’t do that.
Yep I used that but it didn't wkrk
sed
Don't know why
Yes
It’s just meant to be used to write and test code
And uptimerobot is the host
Use heroku instead of repl
yes but if u use uptimer to keep it on...
Ahhg
Uptimerobot is definitely not a host
Heroku
No? It just pings the flask webserver hosted in replit
Check this for a VPS
Which you should totally do
. pls
Free hosting without catches doesn’t exists.
Without code we can't help at all 🤷
Saying "I have an error" doesn't give us information to help you.
100$
And considering you have 8+ years of experience, you should know saying "I have an error" is not enough information for help.
How do I create a purge command using nextcord?
I tried using ctx.channel.purge(limit=limit), but it won't work.
why am i getting this when i am trying to use bored api:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/disnake/client.py", line 505, in _run_event
await coro(*args, **kwargs)
File "/Users/sadancooler/Documents/Code/Python/bots/infinity/lounge.py", line 198, in on_message
BoredAPI = await session.json()
AttributeError: 'ClientSession' object has no attribute 'json'
how to edit message on dropdown menu click ?
this is in my code (in an on_message event)
elif message.content in imbored:
async with aiohttp.ClientSession() as session:
link = await session.get(
"https://www.boredapi.com/api/activity?type=recreational"
)
BoredAPI = await session.json()
someEmbed = disnake.Embed(
title="I'm bored, what should I do?",
description=BoredAPI["activity"],
color=disnake.Color.random(),
)
await message.reply(embed=someEmbed)
perhaps send your code and error
how
@client.command()
async def clear(ctx,amount=2):
await ctx.channel.purge(limit=amount)
this is my code
it won't work
with your hands?
As it says ClientSession doesn’t have that method.
alr
and whats your error?
how to edit message on dropdown menu click ??:V?:V
coroutine json(*, encoding=None, loads=json.loads, content_type='application/json')```
Read response’s body as *JSON*, return [`dict`](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.10)") using specified *encoding* and *loader*. If data is not still available a `read` call will be done,
If *encoding* is `None` content encoding is autocalculated using [cchardet](https://aiohttp.readthedocs.io/en/stable/glossary.html#term-cchardet) or [charset-normalizer](https://aiohttp.readthedocs.io/en/stable/glossary.html#term-charset-normalizer) as fallback if *cchardet* is not available.
if response’s content-type does not match content\_type parameter [`aiohttp.ContentTypeError`](https://aiohttp.readthedocs.io/en/stable/client_reference.html#aiohttp.ContentTypeError "aiohttp.ContentTypeError") get raised. To disable content type check pass `None` value.
It doesn't give an error, but it won't execute the command
are you sure your bot is listening for commands?
perhaps you have an on_message event and are not processing commands?
Yeah, I have on_message event
may i see it?
what do I do?
alr
@client.event
async def on_message(message):
msg = message.content
channel = message.channel
if msg.lower() in bad_words:
await message.delete()
await channel.send("You used foul language.", delete_after=True)
theres your issue
do I need an else?
under the on_message function, process commnds using await bot.process_commands(message)
not really. you just need to process commands.
or use an event listener
what's an event listener, I'm sorry I'm still new to the language.
its a decorator
I see
rather than @bot.event it would be @bot.listen()
wait so why didn't it work?
!d discord.ext.commands.Bot.listen
@listen(name=None)```
A decorator that registers another function as an external event listener. Basically this allows you to listen to multiple events from different places e.g. such as [`on_ready()`](https://discordpy.readthedocs.io/en/master/api.html#discord.on_ready "discord.on_ready")
The functions being listened to must be a [coroutine](https://docs.python.org/3/library/asyncio-task.html#coroutine "(in Python v3.9)").
Example...
because commands arent being processed
do this
you're welcome.
Now it worked, so do I have to use that line of code for every on_message function?
yes, unless its an event listener
an event listener would look something like this
@bot.listen()
async def on_message(message):
pass```
or if you'd like to name the function to something else
```py
@bot.listen("on_message")
async def anything_you_want_to_call_this_function(message):
pass```
no problem.
I have been trying to figure out what the problem was for 30mins
yeahh broo, you're the man.
👍
another thing i noticed about your code, it really isnt an error but just a tip, you are using discord.ext.commands.Bot which is a bot object, but your bot constructor variable is client. thats also common to see, but its incorrect, givin that discord.Client() is a thing, its odd to have a client object and a bot object, yet name the bot object "client".
its bad practice
(strongly assuming you're using discord.py)
Oh I'm using nextcord, that's why I switched to client
I noticed that as well
ah you’re using nextcord, alright
Do you know how to code an economy bot using discord.py?
channel is returning None
meaning the channel either doesnt exist, or isnt in the bots cache
you should get it with int, not str
bc i dont know how to make a codes for cooldown
!d discord.ext.commands.cooldown
@discord.ext.commands.cooldown(rate, per, type=discord.ext.commands.BucketType.default)```
A decorator that adds a cooldown to a [`Command`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Command "discord.ext.commands.Command")
A cooldown allows a command to only be used a specific amount of times in a specific time frame. These cooldowns can be based either on a per-guild, per-channel, per-user, per-role or global basis. Denoted by the third argument of `type` which must be of enum type [`BucketType`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.BucketType "discord.ext.commands.BucketType").
If a cooldown is triggered, then [`CommandOnCooldown`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.CommandOnCooldown "discord.ext.commands.CommandOnCooldown") is triggered in [`on_command_error()`](https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.discord.ext.commands.on_command_error "discord.discord.ext.commands.on_command_error") and the local error handler.
A command can only have a single cooldown.
I have an member object. How do I get the avatar url (not the bytelike object one) of the member object? (In pycord)
anyone have an idea how to make a command which runs python code because i have done:
h = exec(code)
await ctx.send(h)
but that just says "cannot send empty msg"
0 integer returns False in if statement right?
idk, im new to this
how did you do dat
Guys how can I recognize errors from custom checks? I have two checks that are used by an entirely cog and I want to handle them by a single error handler but i don't know how I can know which check raised the error
@commands.Cog.listener()
async def on_error(error):``` idk
This is the generic error handler, i need to know which checks raise an error
raise error
Raise need a class lol
no
So how do I do it?
raise error
Which one hahah
I can't just type raise error xD
lol
what do you need?
this slowmode's killing me
<@&831776746206265384> this chat is inactive make slowmode back to 3 seconds or just 2 seconds 😠
@placid skiff what do you need help with? Can you elaborate, or provide code?
(pseudo or something)
!sm s 3
3 is not a valid duration string.
!slowmode set [channel] <delay>
Can also use: slowmode s
Set the slowmode delay for a text channel.
!sm s #discord-bots 3
3 is not a valid duration string.
!slowmode set [channel] <delay>
Can also use: slowmode s
Set the slowmode delay for a text channel.
✅ The slowmode delay for #discord-bots is now 3 seconds.
Smfh
do !slowmode set
sm s is short for that
wait i didint mean to send that yet
markk....
ok
Not if we don't know your issue
can a bot activate another? what I mean by that is:
could my bot send a command like this:
$tip @user 1 doge
and the other bot will tip the user one doge coin?
nextcord/python bot
see a therapist if you need help
that was my idea. Also you should use databases.
I think i did it, will not know 'till i try tho xD
?
I think that commands can be used only by user, Bots are recognized as bot by other bots
Btw you can use the on_message event to trigger something like that, but you have to make sure that your bot does not response to himself
yep.
how to edit message on dropdown menu click ?:V
async def callback(self, interaction: nextcord.interaction):
...
how can you change a bot's prefix in a cog 🤔
get a function in main
def get_prefix(bot: commands.Bot, message: discord.Message):
...
what database do you use?
i dont 💀
json?
bro i dont use a db
without you cant
could u provide an example :3
async def on_message(message):
if message.author == self.user:
return
@<yourbotvariable>.command()
async def tip(ctx, ...):
...
not my bot
using the tip.cc bot
a bot can't use a bot unless it can, the more you know the more you know.
!sm s #discord-bots 1s
Wrong token
Webscraping
No.
I love crypto
?
You need to shard your bot, it's in over 2500 guilds.
Where do I start?
How do you know?
Error 4011
Hi so I am trying to make a game for my discord bot and i wanted to ask how I can proceed. I wanted to use reactions for the player to control the game any tips ? Appreciate it 🙂
You’re back ❤️ welcome back!
Ik but it won't teach me how to transfer them to my discord bot
So what am I supposed to do now?
💀 bro
Shard your bot.
You get the info and apply them to your bot
okey
the only thing original about it is the controlled randomizer
Ok
Instead of discord.ext.commands.Bot, use discord.ext.commands.AutoShardedBot
but it's heavily influenced by yagpdb's.
Nothing more needed, and no need to edit any of your code.
@slate swan @velvet tinsel Hi so I am trying to make a game for my discord bot and i wanted to ask how I can proceed. I wanted to use reactions for the player to control the game any tips
!d discord.ext.commands.Bot.wait_for
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.9)"). 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.9)") 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.9)") 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**...
learn python read the documentation ? maybe too big of a project if cant find simple info theres plenty of examples in the documentation for reactions
lets take TicTacToe as an example
i dont want to program it so that the player enters his turn and its prints the board
do you understand ?
then maybe check into buttons
Have you already done a tic tac toe in Python, without a bot?
yeah of course
Then you know how to do it using this.
no
one sec
oh god
Again, use this and wait for a user reaction.
ok
There is an example.
what is happenin
It's not needed.
discord.py 2.0 has buttons, you can use them if you want there.
I need help
Ok thanks a million @honest vessel @slate swan
can someone help me
What with?
No, not if you don't give more information.
some broken code
@dusk trout dont ask to ask for help
😆
ctx.voice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCAudio(url)), after=lambda error: self.bot.loop.create_task(self.checkqueue(ctx)))
ctx.voice_client,source.volume=0.5
SyntaxError: invalid syntax
PS C:\Users\kurcp\Desktop\Python> python -u "c:\Users\kurcp\Desktop\Python\susb\music.py"
File "c:\Users\kurcp\Desktop\Python\susb\music.py", line 33
ctx.oice_client.play(discord.PCMVolumeTransformer(discord.FFmpegPCAudio(url)), after=)
I fixed that
remove loop
that did it
thanks
import discord
from discord.ext import commands
from music import Player
intents = discord.intents.default()
intents.members = True
bot= commands.bot(command_prefix="?", intents=intents)
@bot.event
async def on_ready():
print(f"{bot.user.name} is up and running and it hopefully wont crash.")
bot.add_cog(Player(bot))
bot.run("Token")
Traceback (most recent call last):
File "main.py", line 3, in <module>
from music import Player
File "/home/runner/CulturedAgonizingArchive/music.py", line 8, in <module>
class Player(commands.cog):
TypeError: module() takes at most 2 arguments (3 given)
KeyboardInterrupt
KeyboardInterrupt
yeah I broke this
Bot, not bot
There are actually multiple case issues.
Not using capitalization when needed.
How is it possible to execute sqlinjection through the discord chat?
Just like a normal sql injection
like u type some sql query into chat and bot thinks its a real query?
Yes
And add_cog should only be used in the Cog file, in your bot.py file you need to use load_cog.
like it requires skill to pass ctx into sql query
If you don't sanitize it, any time.
It's not rocket science, anyone with a decent knowledge of SQL can do it.
thanks for all your help
but one more question
from discord.ext import commands
how many arguments does this have
it has 2 right
just type some query into a chat?
It's an import statement, there are no arguments.
@tidal hawk ye
That's not where the issue is.
As I said up here ^
@tidal hawk well not a quary u need to inject it google sqlinjection
but in a sense yes a quary that u want it to execute
That’s why I got pinged ok
yup
lol
alright 1 sec
ill get the updated time
@slate swan
Not this picture, the other one.
OH
😄
:)
monday frisky
ive got an extremely stupid issue involving time, and have no clue how to fix it. ive got 2 screenshots to go with it so whoever's interested just dm me for the screenshots
getting an issue i know hardly anything about, ive checked the time slots for the checks and they all seem valid
if datetime.now() - relativedelta(days=182) >= member.premium_since.replace(tzinfo=None) <= datetime.now() - relativedelta(days=91):
boost = " "
if datetime.now() - relativedelta(days=272) >= member.premium_since.replace(tzinfo=None) <= datetime.now() - relativedelta(days=183):
boost = " "```
i then tried to get the raw data of specific dates using
```py
print("boosted",member.premium_since.replace(tzinfo=None))
print("delta : ",datetime.now()-relativedelta(days=184))```
(output is in an image 1)
these are the stats for a user who is only boosting 1 server with both of their boosts, and i know this for a fact, and theyve been boosting since July 2nd 2021 (185 days ago) (image 2)
there
thats their banner lol i didnt get that message 😂
I am creating a command that allows you to assign a commission to the developer, only that when I specify the user sends it in DM to me and not to him and, marks my name and not his. How can I fix?
my code:
async def assign(ctx, user):
embed = discord.Embed(title="Assegnata!", description= f'Ho assegnato la commissione a {ctx.author.mention}')
await ctx.author.send(f"Hey {ctx.author.mention} ti è stata assegnata una commissione!")
await ctx.send(embed=embed)
if not ctx.author.guild_permissions.manage_messages:
await ctx.message.delete()
return await ctx.send(f"{ctx.author.mention} non disponi i permessi/ruoli per eseguire il comando!")```
I write you in PM
How can i get list of role id of the author?
!d discord.Member.roles
property roles: List[Role]```
A [`list`](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.9)") of [`Role`](https://discordpy.readthedocs.io/en/master/api.html#discord.Role "discord.Role") that the member belongs to. Note that the first element of this list is always the default [‘@everyone](mailto:'%40everyone)’ role.
These roles are sorted by their position in the role hierarchy.
Loop over it using, for example, a for loop. Then print the id attribute of each element in the list.
How can i do it though list comprehension?
Struggling abit
It's a simple for loop over ctx.author.roles
I'm getting this [<Role id=923825480006766632 name='@everyone'>, <Role id=924673466836320316 name='Rex'>]
As I said, it's a list and therefore you need a loop.
!e
list = [1, 2, 3]
for element in list:
print(f"Current element: {element}")
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | Current element: 1
002 | Current element: 2
003 | Current element: 3
No

maybe can put list in join
Also no
its str.join(iterable) - and the iterable must composed only of strings
ah
pip install discord.py - this is original?
yes
thanks
import discord
from discord.ext import commands
from music import Player
intents = discord.Intents.default()
intents.members = True
Bot= commands.Bot(command_prefix="./", intents=intents)
@Bot.event
async def on_ready():
print(f"{Bot.user.name} is up and running and it hopefully wont crash.")
async def setup():
await Bot.wait_until_ready()
Bot.add_cog(Player(Bot))
Bot.add_cog(Player(Bot))
Bot.run
Traceback (most recent call last):
File "main.py", line 3, in <module>
from music import Player
File "/home/runner/CulturedAgonizingArchive/music.py", line 8, in <module>
class Player(commands.cog):
TypeError: module() takes at most 2 arguments (3 given)
anyone got an idea of this error?
Again, it's not a cog
So remove the entire setup function.
And all type of add_cog calls.
Just keep bot.run("your token")
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.
wdym
like what am I coding?
If so I am coding a music bot
what have you written so far
Using youtube_dl I suppose 
yes
!rule 5
5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.
hi everybody I have made a bot that returns the list of historical data from wikipedia. the code works but when I enter the command output doesnot comes
if message.content.startswith('$history'):
#Input Format : $history 12 7
msg = message.content
lst=msg.split(' ')
l=len(lst)
date = lst[(l-1)]
month = lst[(l-2)]
history = dates.get_data(month,date)
await message.channel.send(history)```
use this format and copy paste your code where it says print("HelloWorld")
We can't help you for projects that are breaching YouTube's terms of service.
hello
why don’t you use @bot.command()
instead of startswith 
I use this because I saw it in a youtube vedio by freecodecamp.org
copying off a tutorial without knowing what it does
They don’t even teach stuff very accurately, how depressing 💀
guy just pinged somebody 💀
exactly 🚶♂️
aaiyyo. sorry
thanks
brother @velvet tinsel can you tell why the output isnot displayed in the server?

krypton flexing his nitro
i am passing a date and month to the function called get_data() (which works fine when I manually enter the values in it) but the bot doesnot give any output

does anyone know how to log into an account on fortnite and get the display name using requests im trying using some docs but i keep getting response 409
Display code.
This is discord bots.
which code the function get_data?
import requests
import json
def get_data(date, year):
url = "http://history.muffinlabs.com/date/%s/%s"%(date, year)
response = requests.get(url)
data = json.loads(response.text)
req_data = {}
for i in data["data"]["Events"]:
if i["year"] in req_data:
req_data[i["year"]].append(i["text"])
else:
req_data[i["year"]]= [i["text"]]
return req_data
if __name__ == "__main__":
data = get_data(7, 12)
for i in data:
for j in data[i]:
print(i, ":", j)```
ExtensionFailed: Extension 'cogs.general' raised an error: AttributeError: module 'disnake.ext.commands' has no attribute 'commmand'
its a discord bot question
The question doesn’t apply to discord bots, does it? You’re trying to get stuff off fortnite
Anyone?!?!
Cool. We can’t help you
for my bot
Fortnite doesn't have an API.
what are you trying to do?
from disnake.ext import commands```
Did you install disnake?
I have a feeling I’m doing something wrong here
using requests
Fortnite doesn't have an API.
yes i did
people do it all the time using requests
As I said, Fortnite doesn't have an API.
Hi, so I am coding a mod bot and I ran into a problem,
so my ban command that I use the most of the time isn't working properly, the console says: Missing Permissions but the bot has the administrator role in the server where I test it,
Thanks for the help
So you can't make any requests since there is no API.
The bot role is higher than the role of the user you're trying to ban?
Wait, I was doing something wrong. You did disnake.ext.commands, what were you doing there?
It is at the same rank
Make sure the role of the bot is higher.
Do you have admin permissions?
Yes me and the bot
i didnt do disnake.ext.commands
You clearly did?
?
Bot role should be higher, and does the user you're trying to ban have admin permissions?
Maybe you’re running from the wrong file
this error is on something cause i didnt
No
the error says its in cogs.general
Put the bot role higher than the user you're trying to ban.
Send the full error please
Guys probably tryna ban himself 😭
Traceback (most recent call last): File "/home/fazeexotic224/Wicked/cogs/general.py", line 6, in <module> class General(commands.Cog): File "/home/fazeexotic224/Wicked/cogs/general.py", line 10, in General @commands.commmand() AttributeError: module 'disnake.ext.commands' has no attribute 'commmand'
You’re doing something wrong, but I’ve never used classes before. @slate swan help
Maybe it’s self.command?
its not
Krypton, we're friends and all. However, https://fortnite-api.com/ is an unofficial official Fortnite API.
Fortnite-API is a non-official API and not endorsed by Epic Games in any way.
It's an non official API, and therefore wouldn't trust it. Especially if you want to login with your account on it. But yeah, I've seen also it, just a trust issue.
Nothing to do with classes, something wrong with imports.
ok
And can't really see what's wrong, since
from disnake.ext import commands
is the right import. Eventually not saved the file before running the bot?
istg these "official unofficial" type of namings are gonna make me kms
ye i did
want the code to my whole cog?
Well if should just be this?
it is
happens to everyone
Wow
one more question for rn
how to make buttons?
like where is the docs to dpy buttons'
Disnake has some
Soundcloud > Spotify
Hey @dire steeple!
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:
!d discord.ui.Button
class discord.ui.Button(*, style=<ButtonStyle.secondary: 2>, label=None, disabled=False, custom_id=None, url=None, emoji=None, row=None)```
Represents a UI button.
New in version 2.0.
I want my bot to play a audio file when it connects to a call, but it doesn't work. VSCode gives me this warning: "FFmPegPCMAudio" is not defined
The error takes place at line 50. Please help me
How does one generate a unique number? You know, something like a ticket id to give to a user?
!d random.randint you can use this to generate a random number from >= x & <= y.
random.randint(a, b)```
Return a random integer *N* such that `a <= N <= b`. Alias for `randrange(a, b+1)`.
Python is case sensitive. Look at what you imported vs what you are using in line 50
okay!
why am i getting this error: TypeError: Aliases of a command must be a list or a tuple of strings. when i have aliases, this is my code:
@commands.command(aliases=["wyr", "wouldyourather"])
@commands.guild_only()
async def WouldYouRather(self, ctx):
async with aiohttp.ClientSession() as session:
link = await session.get(
"https://would-you-rather-api.abaanshanid.repl.co/"
)
linkJSON = await link.json()
embed = disnake.Embed(
title="Would you rather...",
description=linkJSON["data"],
color=disnake.Colour.random(),
)
await ctx.send(embed=embed)
yes this is in a cog.
I'm not sure about that, but there is an indent before the first async which shouldn't be there
I was actually looking for some library specializing in unique numbers because randint might repeat the same int
Well, you can use the uuid lib to generate UUIDs then.
!pypi uuid
!d uuid.uuid4
uuid.uuid4()```
Generate a random UUID.
It fixes the warning, but it still doesn't play any audio.
hey
@client_main.event
async def on_message(message):
if message.author == client_main.user:
return
if 'th' in message.content and 'upgrade' in message.content:
await message.channel.send('As a reminder make sure youre fully maxed defence, troops, heroes, and spells before you upgrade. **We do not allow rushing, if you rush we will ban you unless if you get direct permission from Vondy.** Rushing is stupid 98% of the time.')
elif 'townhall' in message.content and 'upgrade' in message.content:
await message.channel.send('As a reminder make sure youre fully maxed defence, troops, heroes, and spells before you upgrade. **We do not allow rushing, if you rush we will ban you unless if you get direct permission from Vondy.** Rushing is stupid 98% of the time.')
elif '!rushed' in message.content or '!upgrade' in message.content:
await message.channel.send(' As a reminder make sure youre fully maxed defence, troops, heroes, and spells before you upgrade. **We do not allow rushing, if you rush we will ban you unless if you get direct permission from Vondy.** Rushing is stupid 98% of the time.')
elif 'should' in message.content and 'upgrade' in message.content:
await message.channel.send(' As a reminder make sure youre fully maxed defence, troops, heroes, and spells before you upgrade. **We do not allow rushing, if you rush we will ban you unless if you get direct permission from Vondy.** Rushing is stupid 98% of the time.')
await client_main.process_commands(message)
``` how do it make it where it mentions the user who triggers the key words
im making a warn system on my discord bot, but everytime i try to warn someone it doesn't work.
async def warn(self, ctx, member: discord.Member, *, reason ):
if member.id in [ctx.author.id, self.bot.user.id]:
return await ctx.send("You can't warn yourself or the bot")
current_warn_count = len(
await self.bot.warns.fond_many_by_custom(
{
"user_id": member.id,
"guild_id": member.guild.id
}
)
) + 1
warn_filter = {"user_id": member.id, "guild.id": member.guild.id, "number": current_warn_count}
warn_data = {"reason": reason, "timestamp": ctx.message.created_at, "warned_by": ctx.author.id}
await self.bot.warns.upsert_custom(warn_filter, warn_data)
embed = discord.embeds(
title="get warned",
description=f"__**Reason**__:\n{reason}",
colour=discord.Colour.red(),
timestamp=ctx.message.created_at
)
embed.set_aurthor(name=ctx.guild.name, icon_url=ctx.guild.icon_url)
embed.set_footer(text=f"Warn: {current_warn_count}")
try:
await member.send(embed=embed)
await ctx.send("User got warned in dm's")
except discord.HTTPException:
await ctx.send(member.mention, embed=embed)
maybe even delay the messages by like 3 seconds
-> set_aurthor
-> fond_many_by_custom
no that's just copy pasting code into discord fucks the indent
Yeah man, it doesn't make sense, I have the same aliases thing running perfectly fine in my bot
is it supposed to be uppercase's
set_aurthor should be set_author and fond_many_by_custom should be find_many_by_custom
oh
thank you
Does it join the voice channel?
Use thismessage.author.mention
Or if you only want the name of the sender & don't want to mention themmessage.author.name
thanks will try
Question how can I start the bot and execute the code below as well?
bot.run( ... ) # blocks further input.
other_stuff() # needs to run after bot.
thank you.
Add this when you want the delay
await asyncio.sleep(t)
where t is the number of seconds you want the duration of the delay to be
Call that function in on_ready or something
Doesn't it already do that
sure possible but that's not what I want to do, as it is independent of discord.
When the bot stops running, the function should run
bot.run is blocking , any code after that won't get executed
It should run parallel
Doesn't matter , calling a function stays same.
FUCK YOU!
Then run it in on_ready as valk suggested
on_ready is the workarround but I don't like it😫
at your home or mine?
Trust me, I'm not : P
um , why can't u call before the bot runs
Why? What's the problem you're having?
I might sound strange but let's imagine something like this:
def run():
bot.run()
return value
x = run()
I need x to be set, so passing over bot.run() and complete execute the script and the bot still runs.
So start in some kind of background schedule
you can use the event loop and wait for a coro to finish
how to get the user's name but with user's id
the member object has attributes for that
wher
member.name
member.discriminator
member.id
Hello can anyone tell me which event to use so I can send one message after every hour in that channel
so my database is containing the id of the user, now i wanna make the output as a name
just use asyncio.sleep(3600) and send a message every hour
Which event?
asyncio.sleep()
oh i think you'll have to iterate through the member list
why do you want it to be an event?
so it wont work in different server?
Bruh then how will I do it
what
just make a one time command idk lol
do u mean like forever or what
Wait nvm. I got it
and what u want
kek
@red sundial r u invisible or litteraly offline
oh idle, ok
im idle
idk how to do it tbh
haven't worked with databases a lot
just how to convert IDs into name
do what?
like
828182019841327115
is readed as salvare933 (or soap?)
use the discord.py fetch user by id? get username/nickname?
how to convert IDs into name
it fking shows "how to copy member id" :l
first time hear it
LOL
is
await bot.get_user_info(id)
same?
i think yes..
webscraping is webscraping discord bot is discord bot 😄 but sure u can build it into same dunno why u would not wanna seperate thm tho n have a db to communicate between instead
@undone cairn Are you trying to get the member name after a command is run or is it outside a command?
webscraping is basicly just grab data from a website, with like beatifulsoap
Coz I want to be able to do a full archive search for specific tweets from a user on twitter and twitters API is bullshit.
who tf u pinging to
So now I'm resorting to web scraping
@fluid spindle u tag the wrong soap lol
TAG ALL THE SOAPS
kek
;D
i would suggest use aiohttp if you wanna scrape inside a bot
🧼
oh sorry mate
Soap from mw cod bræh
wym?
Dont drop the soap.
in prison
or else ?
you dont wanna bend down... they say
Like, when are you trying to get the id? After a command is run by the user?
ye
then just ctx.author.id
@fluid spindle
kek
uh how to convert the id to name i mean
ctx.author.nickname etc
hi @sage otter
i dont know em in head, but realname, username, nickname check the docs under member object😄
uh wrong tylerr?
It’s just nick
Then that command would have ctx passed into it, then you could just use
member_obj = ctx.guild.get_member(user_id)
member_name = member_obj.name```
no it isnt
!d discord.Member.nick
The guild specific nickname of the user.
k, lemme try
wut
why not just ctx.author.name?
bruh i'm in my server
convert id to name E
you can use bot.get_user(id)
and how to convert into name
bot.get_user(id).name
I thought you wanted nickname
Same thing, use .name on it
if possible just rea username
Maybe double check the ID you passed?
bot.get_user(id).name
what
This is valid code
my id ;-;
so that's tru?
yeah
if in cog you can do ctx.bot... or self.bot... i think
k, leme try #2
Indeed, personally recommend ctx.bot, in my opinion easier to follow in a command.
It indicates that you are using the function in a command.
i use bot rarely
but thanks for recommendation
idk why we're involving the bot at all, if the user is sending a command, they're also passing ctx, why can't just that be used?
database code
def check_village_owner(village):
village = str(village)
cur.execute("SELECT OWNER from village where NAME = ?", (village,))
check = cur.fetchone()
owner = check[0]
return owner
code in main
v = database.check_village(name)
if v == "n":
await ctx.send("u haven't joined any village! `sal! join [village name]` to join a village or `sal! create village [village name]` to create ur own village!")
else:
o = database.check_village_owner(v)
o = bot.get_user(o).name
draw = ImageDraw.Draw(bg)
font = ImageFont.truetype("big_noodle_titling.ttf", 12)
draw.text((362, 5), v, (0, 0, 0), font=font)
draw.text((365, 19), o, (0, 0, 0), font=font)
bg.save(f"{v}_village.png")
await ctx.send(file = discord.File(f"{v}_village.png"))
error
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'
there ;-;
Same tbh, most of the time the user/member is passed inside the command.
Mostly use bot in tasks etc.
my bot has around 2300+ lines in total
what wrong
and the bot is used in like 10 lines
kek u pissed the "bot"
lemme guess, run and command
Wait... Did that ID thing work out?
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'name'
Did you check if the database returns a true value? Also i notice you are not using an async database..
who
Did you check if the database returns a true value?
last time yes
before the id ofc ;-;
Well you aren't doing that you are just returning a value regardless if it exists or not.
what\
who needs scare database with 34234328 lines
Same as i'm saying right now that your database isn't asynchronous.
i use built-in database in replit
replit for d-bots suc
ok and?
stop using that or u will get rekt soon
I agree repl.it is not meant for Discord bots but it doesn't "suc" it has another purpose.
there, edited
i use replit to have database and 24/7 bot work
arent i return the value in the row/
Just saying "u will get rekt soon" isn't really an argument to support your own statement.
who said that discord server pay
Instead of putting in the ID that you get from the database, try putting the id directly into bot.get_user(), if this works, you know the problem is with the database...
ok
servers to host bot or a site for example,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
obtain realism,,,,,,,,,,,,,,
i have this
@client.event
async def on_raw_reaction_remove(payload):
for role_id, msg_id, emoji in client.reaction_roles:
if msg_id == payload.message_id and emoji == str(payload.emoji.name.encode("utf-8")):
guild = client.get_guild(payload.guild_id)
await guild.get_member(payload.user_id).remove_roles(guild.get_role(role_id))
return
i get this error
Ignoring exception in on_raw_reaction_remove
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "main.py", line 380, in on_raw_reaction_remove
await guild.get_member(payload.user_id).remove_roles(guild.get_role(role_id))
AttributeError: 'NoneType' object has no attribute 'remove_roles'
I'd recommend to just print the value and debug it.
apparently the guild.get_member is None
@small iglooyou sure this returns discord_id of the user? owner = check[0]
return owner
i don't understand why it doesn't work. i copied from my other bot (where it worked fine)
listen
i know replit is bad (in some way)
but i can't pay for a vps
i don't have money to do so
Some guy told me you can host stuff on GitHub, is that right?
That's exactly why i said i won't discard it.
💀 try printing some of the values
Yes you can with Github student you also get microsoft Azure for a limited time.
@small iglooalso what happens if theres few in ur server with same names? ```py
def check_village_owner(village):
village = str(village)
cur.execute("SELECT OWNER from village where NAME = ?", (village,))
check = cur.fetchone()
owner = check[0]
return owner
def check_village_owner(village: str) -> int:
cur.execute("SELECT OWNER from village where NAME = ?", (village,))
owner = cur.fetchone()[0]
return owner
``` i'd also construct it like this.
That's pretty good, but I guess it's not a long term solution
Depending on what specs you choose you use more budget, yes. You get 100 dollar/euro free per year
It's more meant for debugging and testing.
But if you choose like 1/2 cores and 1gb ram it will take the whole year to spend 100 bucks.
i realised its cause i forgot to do the intents
You can get a lot as student, but some people don't bother to use/look for it.
And some schools would really like the students to not know about it
idk how it works, maybe they charge the schools & universities or something
Shit
I've been helping here for a pretty while now and i see so many projects where they limit their students in saying they can't use certain functions.
why is this not working?
import requests, json
apikey = 'apikey'
steamid = steamid
search_url = f'https://rustbanned.com/api/eac_ban_check.php?apikey={apikey}&steamid64={steamid}'
response = requests.get(search_url)
json.dumps(response.json())
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) <-error
We only really work with async libraries here.
is requests not async? D:
You need to have the privileged intent of members enabled
It is not we use aiohttp
Neither is json
The more time I spend here, the more I realize that I need to rewrite so many things in my bot
Ye lol indeed
Moved to aiohttp.. same issue.
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('https://rustbanned.com/api/eac_ban_check.php?apikey={apikey}&steamid64={steamid}') as resp:
print(resp.status)
asyncio.run(main())
``` 🤔 I know the URL works normally when I paste into my browser.
Never really used the api from steam but i'm pretty sure you don't use the api like this.
I'm not using steam api.
the url string isn't an f string (you probably want it to be one)
this also doesn't seem related to the channel
you want the ctx not to be there i suppose?
so the command im trying to make i want it to make users have to use "wd?ban <@user> ?r <reason>" but im not sure how
i thought you could just do
if ctx.message.content == "wd?ban {member.mention} ?r":
<code here>
but that didnt work
what is the async version of json then?
print ctx.message.content
¯_(ツ)_/¯
and see if it's what you expect it to be
@tawdry perch wanna contrib to jarvide?
what?
DMs
make them positional arguments?
I recommend doing so :3
@tawdry perch NO dont its hell
can't you explain here

how?
jarvide looks fine
wd?ban @dusk patio test
i got bullied for spacing erros
thats the value
@blazing lynx ^
To be expected.
shhhh 😔
im new to dpy may i have a example?
not related to dpy
technically member.mention obj wont be equal to string I guesss
more related to python
what do i replace it with
Yeah i'm going with okimii here, i recommend catching up to Python a bit more before proceeding.
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
very nice thing to read
!arg-kwargs
*args and **kwargs
These special parameters allow functions to take arbitrary amounts of positional and keyword arguments. The names args and kwargs are purely convention, and could be named any other valid variable name. The special functionality comes from the single and double asterisks (*). If both are used in a function signature, *args must appear before **kwargs.
Single asterisk
*args will ingest an arbitrary amount of positional arguments, and store it in a tuple. If there are parameters after *args in the parameter list with no default value, they will become required keyword arguments by default.
Double asterisk
**kwargs will ingest an arbitrary amount of keyword arguments, and store it in a dictionary. There can be no additional parameters after **kwargs in the parameter list.
Use cases
• Decorators (see !tags decorators)
• Inheritance (overriding methods)
• Future proofing (in the case of the first two bullet points, if the parameters change, your code won't break)
• Flexibility (writing functions that behave like dict() or print())
See !tags positional-keyword for information about positional and keyword arguments
by caeden?
or me
no snowy😔
sad
not the whole message
you cant bully me ill probably thinking your to drunk
snowy had been kinda hard lately
Damn can't argue with that.
hes to profesional smh😔
color=discord.Color.green() whats wrong with this
😉
🍻
i see nothing wrong with it
🍻
there is a lib that has more colors in that format so you wont have to use hex codes👀
742colors to be exact
ExtensionFailed: Extension 'cogs.moderation' raised an error: TypeError: has_permissions() takes 0 positional arguments but 1 was given
if ctx.author.has_permissions("BAN_MEMBERS"):
so ```py
@commands.has_permissions(administrator=True)
yep
a kwarg is an arg😭
lmao
tf
kwarg = keyword argument
?????????
bro
!d discord.ext.commands.has_permissions
@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").
you ment a positional argument?
def foo(*arg):
print(arg)
foo("hello", "bob")
def bar(**something):
print(something)
bar(something="hello")
no?
@slate swan
tell me 😠
!e ```py
def func(*args, **kwargs):
print(args)
print(kwargs)
func('ddud' ,w='lol', k='w')
@cloud dawn :white_check_mark: Your eval job has completed with return code 0.
001 | ('ddud',)
002 | {'w': 'lol', 'k': 'w'}
ok
no
!e
def foo(*arg):
print(arg)
foo("hello", "bob")
def bar(**something):
print(something)
bar(something="hello")
@velvet tinsel :white_check_mark: Your eval job has completed with return code 0.
001 | ('hello', 'bob')
002 | {'something': 'hello'}
ok
it doesnt need to be called the same thing
Well they can be
:kek:
thats what I meant
kwargs get stored as dicts
I don't like this word puzzle

word puzzles are nice aren't they
boi
yeah
solve this
never gonna give you
up
never gonna let you
down
you should get banned for that
I already was
do it but a big one
@ moderators

!ot
Off-topic channel: #ot2-never-nester’s-nightmare
Please read our off-topic etiquette before participating in conversations.
@.Admins
😨

wait, iirc you cant ping if you edit a message
let me get those emojis😠
@slate swan
i think you can
did you get pinged
Is winrar in jarvide?
of ** ** jarvide
It appears yellow, but you don't get a ping notification or red 1.
yeah
thats why i said im not sure
ok
@slate swan can you test
@slate swan You interested in joining? It's basically all the active people from this channel in a server.
pretty nice not really
Some people are debatable lol
😔
@manic wing
no
😂
whats happening
I saw that xD
@cloud dawn he joined then left cus mark was a dickhead
I can kind of understand that.
i want him to rejoin
!pypi async_cse
API wrapper for the Google Custom Search JSON API. https://developers.google.com/custom-search/v1/overview
how to make the creation date less detailed. i used member.created_at
@bot.command(aliases['b'])
@commands.has_premissions(ban_members=True)
async def ban(ctx, member : discord.Mmeber,*,reason=None):
if member == ctx.author:
em=discord.Embed(description=f"**you** cannot `ban` yourself", colour=discord.Colour.red())
await ctx.send(embed=em)
else:
em2 = discord.Embed(description=f"**{member}** has been `banned` for **{reason}**", colour=discord.Colour.green())
em3 = discord.Embed(description=f"**you** have been `banned` for **{reason}**", colour=0)
await ctx.send(embed=em2)
await member.send(embed=em3)
await ctx.member.ban(reason=reason)```
help?
aliases = ["b"]
@bot.command(aliases=['b'])
@commands.has_premissions(ban_members=True)
async def ban(ctx, member : discord.Member,*,reason=None):
if member == ctx.author:
em=discord.Embed(description=f"**you** cannot `ban` yourself", colour=discord.Colour.red())
await ctx.send(embed=em)
else:
em2 = discord.Embed(description=f"**{member}** has been `banned` for **{reason}**", colour=discord.Colour.green())
em3 = discord.Embed(description=f"**you** have been `banned` for **{reason}**", colour=0)
await ctx.send(embed=em2)
await member.send(embed=em3)
await ctx.member.ban(reason=reason)
@fervent shard
tyy
yw
typo
in the type hint
@slate swan ???????
created_at.strftime
!d datetime.datetime.strftime
datetime.strftime(format)```
Return a string representing the date and time, controlled by an explicit format string. For a complete list of formatting directives, see [strftime() and strptime() Behavior](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior).
you can format it according to yourself
!e ```py
from datetime import datetime
current = datetime.now()
print('non edited : ' , current )
print('formatted : ' , current.strftime('%d %B %Y'))```
@slate swan :white_check_mark: Your eval job has completed with return code 0.
001 | non edited : 2022-01-03 18:13:15.319665
002 | formatted : 03 January 2022
^^^^
you can
!d discord.Member.public_flags
property public_flags```
Equivalent to [`User.public_flags`](https://discordpy.readthedocs.io/en/master/api.html#discord.User.public_flags "discord.User.public_flags")
hm
maybe i have to use
member.public_flags()?
lemme try
well that doesnt work
now im just confused
hey @slate swan do you know?
Let's see the code
"Discord Badges: {member.public_flags}"
What's the easiest way to take a tagged user eg @ebon island as an argument and convert it into a discord Member object?
it returns PublicUserFlag object
a second
member: discord.Memberthis?
confused what you want
no
example pls
🏃♂️ just remove <!@> from the mention string , and use get_user
oh u need member
user is fine
No, type hint it
if its a command , sure
As you got told here
dpy converts it
aka it converts the member arg to a member obj
I misunderstood that example when okimii first posted it, puny brain didn't comprehend that was type hinting and not a lambda or something
🏃♂️ dpy basically does the same
lambda is just a function lol
horrible explanation btw
what was a horrible explanation lol
lambda is just a function lol
@slate swan no one pays for winrar u kno that
I do, so you're wrong.
😛
the "aka it converts the member arg to a member obj",dpy just get_'smember or fetch'esmember from the message.content to get the mentions
the best trial period ever


