#discord-bots

1 messages · Page 579 of 1

slate swan
#

Look the space

#

After the url

sudden aspen
#

Hey everyone! I'm trying to run this code:

import discord
from discord.ext import commands, tasks


bot = commands.Bot(command_prefix='<')

@bot.event
async def on_ready():
    print('I am ready!')


@tasks.loop(seconds=60)
async def is_still_sub():
    guild = bot.get_guild(900888494304538644)
    treasure = guild.get_role(905285009873731605)
    twitch_sub = guild.get_role(905284976109580319)
    print(treasure.members)
    for member in twitch_sub.members:
        if treasure in member.roles:
            pass
        else:
            await member.remove_roles(treasure)
is_still_sub.start()


bot.run('My token is here')```


but I keep getting this error: 

```py
Unhandled exception in internal background task 'is_still_sub'.
Traceback (most recent call last):
  File "/Users/me/Library/Python/3.7/lib/python/site-packages/discord/ext/tasks/__init__.py", line 101, in _loop
    await self.coro(*args, **kwargs)
  File "/Users/me/Python/SubBot.py", line 15, in is_still_sub
    treasure = guild.get_role(905285009873731605)
AttributeError: 'NoneType' object has no attribute 'get_role'```


Does anyone know what's going on and how to fix it? Thanks!
#

Oops I didn't realize my message was that long, sorry 😦

sudden aspen
kindred epoch
#

whatever you defined guild as is none

sudden aspen
kindred epoch
#

!d discord.ext.commands.Bot.wait_until_ready

unkempt canyonBOT
#

await wait_until_ready()```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Waits until the client’s internal cache is all ready.
kindred epoch
#

add that

sudden aspen
#

Where should I add it in my code?

kindred epoch
#

on the top of everything in the task

slim whale
#
  boosts = guild.premium_subscription_count
  boostlvl = ""
  if boosts == 2 or 3 or 4 or 5 or 6:
    boostlvl = ":Boostlvl1:"
  elif boosts == 7 or 8 or 9 or 10 or 11 or 12 or 13:
    boostlvl = ":Boostlvl2:"
  elif boosts > 14:
    boostlvl = ":Boostlvl3:"``` the guild that im trying this has 1 boost and it sends the boostlvl1 emoji
#

why?

sudden aspen
# kindred epoch on the top of everything in the task

If I do this: py @tasks.loop(seconds=60) async def is_still_sub(): await wait_until_ready() guild = bot.get_guild(900888494304538644) treasure = guild.get_role(905285009873731605) twitch_sub = guild.get_role(905284976109580319) print(treasure.members) for member in twitch_sub.members: if treasure in member.roles: pass else: await member.remove_roles(treasure) is_still_sub.start()
It says wait_until_ready is not defined

kindred epoch
#

you're not supposed to copy paste whatever the bot highlights

slim whale
#

ok

kindred epoch
#

wait_until_ready is a attribute of commands.Bot now, if you know what i mean you should be able to get it

slim whale
# kindred epoch print boosts
@bot.command()
async def testst(ctx):
  await print(guild.premium_subscription_count)``` idk if i need to await 😂
kindred epoch
#

holy shit

slate swan
kindred epoch
#

wtf?

slim whale
#

XDDDDDDD

#

didnt remember that

sudden aspen
slim whale
#

?

kindred epoch
#

"didnt remember that"

#

more like you dont know python

slate swan
slim whale
#

ok bro, im sorry :/

slim whale
kindred epoch
slim whale
blissful lagoon
#

!mute 675414248620294154 1w You need to look at our rules and code of conduct. That is not acceptable behavior.

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied mute to @kindred epoch until <t:1636665585:f> (6 days and 23 hours).

crimson pulsar
slate swan
#

Dumb mistakes happen to everyone 🤷‍♂️

#

Thats one of the parts of learning🤷‍♂️

slim whale
slate swan
#

Oh well, it just gives the days not hours

blissful lagoon
#

it gives both the end timestamp and the duration

slate swan
#

My bad

#

Yeah but was wondering why not using relative timestamp for the part in parentheses

#

But it also gives the hours, which the relative timestamp doesn't

#

help me please, Nothing happens when I make the order

@bot.command()
async def giveroleallmember(ctx): # b'\xfc'
    await ctx.message.delete()    
    role = discord.utils.get(ctx.guild.roles, name="member")
    for member in list(ctx.guild.members):
        try:
            await ctx.guild.member.add_roles(role)
        except:
            pass
#

Don't make an except -> pass

#

Print the exception

#

how

#
except Exception as e:
    print(e)
#

my code is good ?

#

Just print the exception

#

Then you will know what's wrong

#

Since nothing happens you got an error, and your except just does nothing at the moment

#
@bot.command()
async def giveroleallmember(ctx): # b'\xfc'
    await ctx.message.delete()    
    role = discord.utils.get(ctx.guild.roles, name="member")
    for member in list(ctx.guild.members):
        try:
            await ctx.guild.member.add_roles(role)
        except:
            except Exception as e:
    print(e)```
#

No..

slate swan
#

Why except except

slate swan
slate swan
#

Just once

#

Also don't use list() on ctx.guild.members, it's already returning a list

#

And yeah, you need to do member.add_roles

slate swan
sudden aspen
#

Hi again everyone, I have an other problem with my code, this bot is meant to check everyone who has a role called treasure if someone who has that role doesn't have a role called twitch sub I want the bot to remove the role treasure from that specific user.

import discord
from discord.ext import commands, tasks


bot = commands.Bot(command_prefix='<')

@bot.event
async def on_ready():
    print('I am ready!')


@tasks.loop(seconds=60)
async def is_still_sub():
    await bot.wait_until_ready()
    guild = bot.get_guild(900888494304538644)
    treasure = guild.get_role(905285009873731605)
    twitch_sub = guild.get_role(905284976109580319)
    print(treasure.members)
    for member in twitch_sub.members:
        if treasure in member.roles:
            pass
        else:
            await member.remove_roles(treasure)
is_still_sub.start()


bot.run('My token is here')```

But now if I run the code the command `print(treasure.members)` doesn't return any members even though it should because there are some members in my server who has that role
slate swan
#

'Guild' object has no attribute 'member'

#

It's members

#

:x

#

okay

unkempt canyonBOT
#

Using intents in discord.py

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

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

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

from discord import Intents
from discord.ext import commands

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

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

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

slate swan
# slate swan It's member**s**
@bot.command()
async def giveroleallmember(ctx): # b'\xfc'
    await ctx.message.delete()    
    role = discord.utils.get(ctx.guild.roles, name="member")
    for members in ctx.guild.members:
        try:
            await ctx.guild.members.add_roles(role)
        except Exception as e:
            print(e)```
#

'list' object has no attribute 'add_roles'

#

As i said, it's member.add_roles not ctx.guild.members.add_roles

sudden aspen
# slate swan Intents

It still doesn't work even if I do this ```py
import discord
from discord import Intents
from discord.ext import commands, tasks

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

bot = commands.Bot(command_prefix='<')

@bot.event
async def on_ready():
print('I am ready!')

@tasks.loop(seconds=60)
async def is_still_sub():
await bot.wait_until_ready()
guild = bot.get_guild(900888494304538644)
treasure = guild.get_role(905285009873731605)
twitch_sub = guild.get_role(905284976109580319)
print(treasure.members)
for member in twitch_sub.members:
if treasure in member.roles:
pass
else:
await member.remove_roles(treasure)
is_still_sub.start()

bot.run('My token')```

slate swan
#

Well now it's members.add_roles

#

Actually members.add_roles since you named your variable for looping members

#

Since you changed the name of the variable

slate swan
slate swan
sudden aspen
slate swan
#

And you need to pass the intents=intents kwarg

sudden aspen
slate swan
slate swan
slate swan
#

The bot added that the role alone

#

In the bot constructor

slate swan
slate swan
slate swan
slate swan
slate swan
slate swan
slate swan
slate swan
#

From top to bottom

slate swan
slate swan
#

Yw

jade tartan
#

Can this be a command instead of an event?

dapper cobalt
#

self.is_it_me since the function is defined inside the class.

stark hearth
#

bot = commands.Bot(command_prefix = '<', intents = intents)

stark hearth
slate swan
jade tartan
slate swan
#

Just make it a client.command()

#

And add the other stuff ofc

jade tartan
#

like whats the whole code for that feature

jade tartan
slate swan
rustic osprey
#

i am a noob at coding discord bots so this server may be my saving grace when I am having issues

jade tartan
jade tartan
#

like make the application for apply for staff and making the bot ask questions

#

and then getting reviewed

#

and giving feedback

slate swan
jade tartan
#

no

#

like the whole code

#

the whole code after the command

#

am sorry am kind of terrible at explaining

#

but am trying my best

#

like to get the wait_for funtion

slate swan
#

I have no idea what your talking about

jade tartan
#

nvm

#

i mean

#

How to make the bot do this

#
async def on_message(message):
    if message.content.startswith('$thumb'):
        channel = message.channel
        await channel.send('Send me that thumbsup reaction, mate')

        def check(reaction, user):
            return user == message.author and str(reaction.emoji) == 'thumbsup'

        try:
            reaction, user = await client.wait_for('reaction_add', timeout=60.0, check=check)
        except asyncio.TimeoutError:
            await channel.send('thumbsdown')
        else:
            await channel.send('thumbsup')```
#

as in like send the dms and make sure for when a member does a command it sends him/her few questions to answer

rotund nova
#

Can i get free vps for bot?

#

Or very cheap

slate swan
jade tartan
#

Hi i have a json directory error

#
Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "c:\Users\thoma\Desktop\discord.py\bot.py", line 70, in on_message
    with open('users.json', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'users.json'```
#

hang on am confused

slate swan
#

someone?

jade tartan
#
Traceback (most recent call last):
  File "C:\Users\thoma\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "c:\Users\thoma\Desktop\discord.py\bot.py", line 70, in on_message
    with open('users.json', 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'users.json'
slate swan
#

Please actually learn before watching how to make a leveling system

#

The error is so simple

#

There no such a file called user.json in your files

jade tartan
#

Well i know but then it is in a directory folder called discord.py

jade tartan
#

ik what the message means

#

i really do

slate swan
jade tartan
slate swan
#

wait hold on

jade tartan
#

What?

jade tartan
#

its in the right directory folder

#

/path

slate swan
#

restart vsc

#

My discord bot is the owner of a sevrer, does anyone have a command to transfer ownership

#

I cannot find anything

jade tartan
#

done that already

#

no solution still

slate swan
#

Yikes

#

I know discord API allows it because I did it before on bot client

#

But RIP bot client

jade tartan
#

So

slate swan
jade tartan
#

Ok ill show the whole code

slate swan
#

I dont need the whole

#

all i need is when the script

#

stops

#

is there any way i can setup an error message without putting it in a seperate part of my source?

#

for example

@bot.command(name='test')
async def test(ctx, member : discord.Member, reason = None):
  #do something
@test.error
async def test_error(ctx,error):
    if isinstance(error,commands.MissingRequiredArgument):
        embed = discord.Embed(title=f'Error', description=f'Usage - test [member] (reason)', color=0x2f3136)
        await ctx.reply(embed=embed)
        return

but the error is within the test function

#

I’m just wanting to make a bot that picks movies from the few you give, say
!pick Baby Driver | Guns akimbo | Your Name
And it randomly selects one of the 3, I’m new to coding bots, that’s why I’m here

neon oyster
neon oyster
slate swan
boreal ravine
#

yes

neon oyster
slate swan
#

Any sites that give info on how to do stuff for bots?

neon oyster
#

?

neon oyster
slate swan
fluid sand
#

dms

slate swan
fluid sand
slate swan
fluid sand
slate swan
neon oyster
#

np

slate swan
karmic totem
#

!d discord.on_member_join

unkempt canyonBOT
#

discord.on_member_join(member)``````py

discord.on_member_remove(member)```
Called when a [`Member`](https://discordpy.readthedocs.io/en/master/api.html#discord.Member "discord.Member") leaves or joins a [`Guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Guild "discord.Guild").

This requires [`Intents.members`](https://discordpy.readthedocs.io/en/master/api.html#discord.Intents.members "discord.Intents.members") to be enabled.
slate swan
#

dm me whicch half, cuz a lot are still active

#

i owned og 1500, and 1400

#

oh want the new 1400 inv?

#

/ic3

#

nah they changed it

#

i quit that stuff

#

oh youre in it lol

#

mhm

#

go dms

slate swan
# slate swan I’m just wanting to make a bot that picks movies from the few you give, say !pi...

Since you said that you're new to "coding bots" and not coding itself, I'll give you a brief idea of how to do it:

import discord
from discord.ext import commands

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

@bot.command(name="pick")
async def pick(ctx: commands.Context, *, picks: str):
   ...  # You continue the code here because from this point on it's just python

bot.run('token')

Now that you can use the .split method on the picks because it's a string, and using the random module you can use it to get a random item from the list that's returned from using the split method on the string

#

However if you're new to coding itself, then go in #bot-commands and type !resources and learn more about python before you decide to create a discord bot

slate swan
#

There's docs

#

Thanks

rain olive
slate swan
#

A discord app?

#

Elaborate, what's a discord app meant to be

fluid sand
slate swan
#

No clue what those are

#

But if you mean an app like discord then yeah i don't see why not

#
    @commands.command()
    async def userinfo(self, ctx, member:discord.Member):
        embed = discord.Embed(colour=0x000000, timestamp = ctx.message.created_at)
        embed.set_author(name="User info")
        embed.set_thumbnail(url=member.avatar_url)
        embed.add_field(name="Pseudo", value=member, inline=False)
        embed.add_field(name="Surnom", value=member.display_name, inline=False)
        embed.add_field(name="ID", value=member.id, inline=False)
        embed.add_field(name="Status", value=member.status, inline=False)
        embed.add_field(name="Join le", value=member.joined_at, inline=False)
        embed.add_field(name="\nCompte crée le", value=member.created_at.strftime("%a, %#d %B %Y, %I:%M %p", inline=False))
        await ctx.send(embed=embed)

@slate swan :))

#

?

#

not enable

#

?

#

Command raised an exception: TypeError: strftime() takes at most 1 argument (2 given)

#

@slate swan please :/

#

!docs datetime.datetime.strftime

unkempt canyonBOT
#

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).
slate swan
#

Is there a way for a bot to transfer its ownership of a server to someone else

#

I really want it to leave the server

slate swan
#

You're closing your strftime too late

slate swan
slate swan
slate swan
slate swan
#

Where they're still supported

slate swan
#

I bot it to make its own discord server

fluid sand
slate swan
#

Because afaik everything about selfbots is deprecated

slate swan
slate swan
#

Can you mix and match old version of python

#

im guessing not

#

Of python??

#

Why of python?

#

Idk what you are saying by trying an older version

#

Im just trying to transfer ownship haha

#

pip install discord.py==version
e.g: pip install discord.py==1.7.2

#

Forgot what dpy's versions were

#

thats gonna break all my codes though

#

You can find them if you go to the repo and check the tags

visual island
slate swan
slate swan
#

oof

#

And yeah, I can send self bot coding here

#

Then you can do it with the current version by making your own API call

#

its not hard to do

slate swan
#

Lmao

#

So only do it to fix that ownership, after that don't use anything related to selfbotting 👍

#

!rule 5

unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

slate swan
#

its a genuine bot that has ownership

#

!rule 5 again

unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

slate swan
#

Selfbots are against ToS

#

Guys

slate swan
#

Discord Developer Portal TOKEN

#

Not user token

#

not self bot

slate swan
#

bot ideas anyone?

slate swan
#

Bot tag

slate swan
#

a bot cant own a server can it?

slate swan
visual island
#

it can

slate swan
slate swan
slate swan
slate swan
slate swan
#

whats self botting

#

Those endpoints got deprecated for a reason

#

Tell me what the difference is between automated user account and a discord bot

slate swan
# slate swan wifi is trash so no

Awe, I was gonna make one myself but I’m tired, just something so you do !pick movie | movie 2 | movie 3
etc it randomly chose one

#

Automating normal user accounts (generally called "self-bots") outside of the OAuth2/bot API is forbidden, and can result in an account termination if found.

slate swan
#

Ok that makes sense pithink

slate swan
#

Anyways, the endpoints that you're trying to use are deprecated so use an older version of dpy or make the API call yourself

visual island
slate swan
visual island
#

you can, can't you?

#

!d discord.Guild.edit

unkempt canyonBOT
#
await edit(*, reason=..., name=..., description=..., icon=..., banner=..., splash=..., discovery_splash=..., community=..., region=..., afk_channel=..., owner=..., ...)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Edits the guild.

You must have the [`manage_guild`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.manage_guild "discord.Permissions.manage_guild") permission to edit the guild.

Changed in version 1.4: The rules\_channel and public\_updates\_channel keyword-only parameters were added.

Changed in version 2.0: The discovery\_splash and community keyword-only parameters were added.

Changed in version 2.0: The newly updated guild is returned.
visual island
#

owner kwarg

slate swan
#

I made it so my bot makes its own server

#

That's a thing??

#

But now I cant figure out how to switch ownership

visual island
#

mhm

slate swan
#

I didn't know that 💀

pliant gulch
slate swan
#

Thank you guys

#

Please dont ban for self bot because it isnt

#

Even though they keep saying it is

slate swan
# slate swan like a embed?

No so you do the
!pick
Then u put the movies you want deciding,
So
!pick input | input | input
But so you can have more than 3, let’s say up to 5

#

So say I wanted a bot to decide between

Ice age
Flushed away
DOOM

I’d do
!pick ice age | flushed away | DOOM

crude crater
#

There are infinite black and white dots on a plane. Prove that the distance between one black dot and one white dot is one unit. I bet you can't

unkempt canyonBOT
crude crater
#

crude crater
boreal ravine
#

Bruh

crude crater
#

I know its off topic but nobodies even in here

slate swan
#

Doesn't matter, this channel is only for help for discord bots

crude crater
# slate swan Doesn't matter, this channel is only for help for discord bots

I'm so incredibly sorry. The amount of regret I have is unbearable and I can't sleep at night now just thinking about how I have broken the rules inside of the Python Discord Server channel. I truly and deeply apologize, I hope you can come to an understanding and forgive me. I don't know how I can live with myself

slate swan
#

💀

boreal ravine
#

👍

slate swan
crude crater
#

Haha

crude crater
# slate swan

I'm so incredibly sorry. The amount of regret I have is unbearable and I can't sleep at night now just thinking about how I have broken the rules inside of the Python Discord Server channel. I truly and deeply apologize, I hope you can come to an understanding and forgive me. I don't know how I can live with myself

#

Already said it once

boreal ravine
slate swan
boreal ravine
#

ok?

crude crater
# slate swan Clone msg

Thank you so much for the much needed input! I'm greatly appreciative of it! I hope you live an amazing life and don't get into a horrific car crash killing you and your parents tomorrow at 7:57 PM MST. I'm so happy you said this

slate swan
#

Wtf 😂

unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

slate swan
#

Who is this man?

slate swan
slate swan
crude crater
# slate swan !rule 7

I know the rules now due to the much repeated times of me being told to stay on topic! Thank you again for this!

slate swan
crude crater
unkempt canyonBOT
#

7. Keep discussions relevant to the channel topic. Each channel's description tells you the topic.

slate swan
slate swan
#

😂😂😂

#

This guy is funny ngl

boreal ravine
#

¯_(ツ)_/¯

slate swan
#

Today, but later on because I’m too fuckin tired lmao

#

¯\_(ツ)_/¯

crude crater
# slate swan This guy is funny ngl

Stop going off topic please, this is not for comedical value but rather for someone to learn how to type code that they can copy and paste off of Google. If you keep going off topic I will have no choice but to report you to the federal government and have you locked up. !rule 7

slate swan
crude crater
slate swan
slate swan
boreal ravine
#

Stop being annoying bruh

slate swan
#

Kinda getting unfunny at this point ¯_(ツ)_/¯

crude crater
unkempt canyonBOT
slate swan
crude crater
slate swan
#

We should call a mod tbh

slate swan
slate swan
#

You have await t.delete()), why is there an extra ")"??

#

Because of the button

#

It's in the buttob

crude crater
slate swan
#

Button*

#

The whole code looks confusing

#

Why are you executing functions when you're defining a list of buttons

#

You're adding link buttons, I only see 2 link buttons

boreal ravine
slate swan
#

Actually it's only 1 link button nvm mb

boreal ravine
#

ghost pinged

slate swan
#

<@&831776746206265384> this guy (@crude crater) keeps being off topic and sending shit post

boreal ravine
#

You aren't even a staff..?

crude crater
slate swan
crude crater
#

I'm trying to enforce rules

slate swan
crude crater
#

Thank you!

slate swan
#

Its replying

slate swan
slate swan
#

Hmmmm

#

Worth it

slate swan
crude crater
# slate swan Yes

I believe he was asking staff since you do not have sufficient permissions to mute

slate swan
#

🤦‍♂️

crude crater
slate swan
#

I swear

crude crater
#

Please stop going off topic guys

slate swan
crude crater
#
@bot.command(ctx, user)
async def who smells like shit?(ctx):
    await ctx.send(f'Okimii smells like shit!')
slate swan
#
m = await client.wait_for("message", check)
``` can someone help me with a ceck
crude crater
#

What's wrong with my code?

slate swan
#

check*

slate swan
crude crater
slate swan
crude crater
#

I'm trying to get some help pls

slate swan
#

o

crude crater
#

Guys I need help

slate swan
#

just need help getting started

boreal ravine
glacial sail
slate swan
crude crater
#

It doesn't work

boreal ravine
crude crater
#

This is my first discord bot

boreal ravine
#

liar

slate swan
#

i need help with the check function

slate swan
crude crater
glacial sail
#

!mute 700830338204696651 low effort trolling

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied mute to @crude crater until <t:1636080376:f> (59 minutes and 59 seconds).

slate swan
#

Finally

#

a whole hour r.i.p

slate swan
boreal ravine
#

make sure the function is in the function

slate swan
#

The check function has the message arg which is a discord.Message object

slate swan
slate swan
#

Or you could also just use lambda ```py
message = await bot.wait_for('message', check=lambda m: m.author == ctx.author)

slate swan
slate swan
#

Ig for a faster response dm reporting is the way 😌

slate swan
#
l = await client.wait_for("message", check=check)
``` how do i get the member mentioned in this just use l.content and hope they only mention a user
#

l.mentions

#

Returns a list of discord.Member objects, if no mentions found the list is empty

glacial sail
#

I noticed the mod ping first actually - it was just taking me a moment to catch up on what was happening.

slate swan
#

Understandable pithink

slate swan
glacial sail
#

when there's a lot of people talking, it's not always easy to see who's in the wrong.

#

for a minute, yeah.

slate swan
#

Thank you btw.

glacial sail
#

sure thing, sorry for the delay 🙂

slate swan
#

Not a problem

#

how could I make a custom server prefix from a database I have the database but how would I set the prefix for the server

jade tartan
#

Its hard out here in NZ

primal fox
slate swan
#

how exactly would that work

#

would I get the prefix in the function

#
l = await client.wait_for("message", check=check)
          user = l.mentions
          us = client.get_user(user)
          try:
            if us is None:
              await ctx.reply("User is invalid!")
            else:
              try:
               embed = discord.Embed(description=f"{text} - sent from {ctx.author}",color=color)
               await us.send(embed=embed)
               embed2 = discord.Embed(title="wintrs",color=green,description=f"DMed {us}")
               await ctx.reply(embed=embed2)
primal fox
slate swan
#

uhmm i have a feeling theres the worls dumbest error here

primal fox
# slate swan would I get the prefix in the function

it's a function of a message object, because the bot uses the current message to determine what the prefix should be. so you can just find the guild for that message, and lookup the prefix in your database for that guild

slate swan
#
cluster = MongoClient(mongo)
db = cluster["urls"]
collection = db['urls']

def get_prefix(sid):
  collection.find({'_id': sid})

tokino = commands.Bot(command_prefix = get_prefix())
#

how would I get the id of the server

slate swan
#

!docs discord.Message.mentions

unkempt canyonBOT
#

A list of Member that were mentioned. If the message is in a private message then the list will be of User instead. For messages that are not of type MessageType.default, this array can be used to aid in system messages. For more information, see system_content.

Warning

The order of the mentions list is not in any particular order so you should not rely on it. This is a Discord limitation, not one with the library.

primal fox
#
async def get_prefix(message):
  guild = message.guild
  result = collection.find({'_id': guild.id}) # probably, maybe mess with this
  return result
#

@slate swan ^

slate swan
slate swan
primal fox
slate swan
#

so then the prefix code would be

tokino = commands.Bot(command_prefix = get_prefix(what would go here)
#

nothing

primal fox
#

command_prefix=get_prefix

slate swan
#

oh that makes sense my bad

primal fox
#

you're giving the bot a function to run whenever it needs to find a prefix

slate swan
primal fox
# slate swan ?

it is a list of the all the members who were mentioned in the message you waited for

#

so if I only mention you like this: @slate swan the mentions will be [YourMemberObject]

#

if you wanna be sloppy, you can just get the first element with myList[0]

quiet smelt
#

how do you find account age

#

like detect account age

#

@slate swan huh?

#

did you ping me?

slate swan
#
async def get_prefix(message):
  result = collection.find({'_id': message.guild.id}) 
  return result
error:

Ignoring exception in on_message
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/client.py", line 351, in _run_event
    await coro(*args, **kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 1035, in on_message
    await self.process_commands(message)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 1031, in process_commands
    ctx = await self.get_context(message)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 941, in get_context
    prefix = await self.get_prefix(message)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 886, in get_prefix
    ret = await nextcord.utils.maybe_coroutine(prefix, self, message)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/utils.py", line 512, in maybe_coroutine
    value = f(*args, **kwargs)
TypeError: get_prefix() takes 1 positional argument but 2 were given
sick birch
#

is there any specific reason you need linode?

#

i mean other than that

#

quite biased here but imo aws is better due to it's insane scalability

#

EC2 is pretty nice

boreal ravine
#

hm

sick birch
#

i mean there's a lot of huge companies use AWS

#

for good reason most likely

pale zenith
#

EC2 is quite expensive, to be honest.

sick birch
#

yeah agreed

#

but they have a bunch of different options

pale zenith
#

Once my free-tier expires its estimated to 14$/month, for that i plan to switch to a different host. I can get the same for a third or fourth of the price.

#

A W S

sick birch
#

though AWS scales really well

#

even if your bot gets huge, you can scale it relatively easily

pale zenith
#

How so

sick birch
#

i.e the EC2 auto scaling one

pale zenith
#

i see

#

I do not see the appeal of that to be honest

sick birch
#

scalability is a concern for a lot of companies that use AWS, so it's in their best interest to be scalable

pale zenith
#

🤔

#

I still stand by my word. For a discord bot, there are better options out there

sick birch
#

compared to huge companies like netflix or twitch

pale zenith
#

yeah, exactly

sick birch
#

heck just buy a raspberry pi for it, runs a discord bot well as anything

#

once you get over the initial investment the electricity cost is negligible

pale zenith
slate swan
#

so what would I have to change

#

or add

pale zenith
#
async def get_prefix(bot, message):
    return whatever
slate swan
#

would bot be what I defined commands.Bot as

#

LEOO

sick birch
#

quick note i'd like to add here is not NOT make a database call inside get_prefix

pale zenith
#

CATTTT!

slate swan
#

AAAAAA

pale zenith
slate swan
#

AA how did i find you

sick birch
#

perhaps redis but that might be overkill

pale zenith
slate swan
#

nah im good

pale zenith
sick birch
#

yep

pale zenith
#

and depending on the database it wouldnt be an issue even

#

for example mongodb is quite fast

sick birch
#

and depending on the bot

pale zenith
#

that true also

sick birch
#

does anyone know the numbers as to how many reads sqlite can do per second?

#

I assume read speeds are faster, so a bit more than 50k reads per second on average?

pale zenith
#

yeah

#

as for postgres, as it seems quite popular,

If you're simply filtering the data and data fits in memory, Postgres is capable of parsing roughly 5-10 million rows per second (assuming some reasonable row size of say 100 bytes). If you're aggregating then you're at about 1-2 million rows per second.

sick birch
#

when you're talking about this small amounts of time, ssd/hdd also plays quite a big part

#

yeah unless you're getting millions of messages per second it theoretically shouldn't be an issue

sick birch
pale zenith
#

yeah. some cache like Redis is only good for those bots that are in thousands of servers

#

a dictionary is probably the best and simplest idea

sick birch
#

a simple dict or some other datastructure of that sort will suffice in most cases

pale zenith
#

or a defaultdict(list)

#

to not have to handle the whole keyerror

#

and just call append and so on, on the thing

sick birch
#

why not just use .get on a dict

#

to avoid keyerrors

slate swan
#

im getting the error

command_prefix must be plain string, iterable of strings, or callable returning either of these, not NoneType
pale zenith
#

get_prefix returned None

slate swan
#
async def get_prefix(tokino, message):
  result = collection.find({'_id': message.guild.id})
  for i in result: 
    return i['prefix']
#

why is that happening

sick birch
#

probably result is empty, and it's not entering the for loop

maiden fable
#

Then it would have raised an error that NoneType isn't iterable

fluid sand
#

m

sick birch
maiden fable
#

Print i["prefix"] @slate swan

maiden fable
boreal ravine
#

the collection is empty

maiden fable
#

result can't be None...

boreal ravine
#

hm

sick birch
#

what's the command to run lil snippets again

#

i'd like to test something

maiden fable
#

eval?

sick birch
#

nah with @unkempt canyon

maiden fable
#

Yes

#

!e print(1)

unkempt canyonBOT
#

@maiden fable :white_check_mark: Your eval job has completed with return code 0.

1
sick birch
#

!e

mylist = []
for i in mylist:
  print(i)
unkempt canyonBOT
#

@sick birch :warning: Your eval job has completed with return code 0.

[No output]
sick birch
#

i see

maiden fable
#

Yea

#

But if it's None, then would raise an error haha

#

!e
mylist = None
for i in mylist:
print(i)

unkempt canyonBOT
#

@maiden fable :x: Your eval job has completed with return code 1.

001 | Traceback (most recent call last):
002 |   File "<string>", line 2, in <module>
003 | TypeError: 'NoneType' object is not iterable
maiden fable
#

See

#

kayle ^^^

sick birch
maiden fable
#

Since there's nothing to loop over haha

sick birch
#

yeah then if collection.find returns an empty list, it just won't do the for loop

maiden fable
#

Hea

#

Yea***

slate swan
maiden fable
slate swan
#

for i in result:
print(i)

maiden fable
#

Ah okay

#

And what happens when u print i["prefix"]?

boreal ravine
#

hm

jade tartan
#

@crude crater

#

Yes i do have a file called users.json

unkempt canyonBOT
kindred forge
#

how to make discord bots send pictures?

tiny ibex
tiny ibex
maiden fable
unkempt canyonBOT
#

Thanks to discord.py, sending local files as embed images is simple. You have to create an instance of discord.File class:

# When you know the file exact path, you can pass it.
file = discord.File("/this/is/path/to/my/file.png", filename="file.png")

# When you have the file-like object, then you can pass this instead path.
with open("/this/is/path/to/my/file.png", "rb") as f:
    file = discord.File(f)

When using the file-like object, you have to open it in rb mode. Also, in this case, passing filename to it is not necessary.
Please note that filename can't contain underscores. This is a Discord limitation.

discord.Embed instances have a set_image method which can be used to set an attachment as an image:

embed = discord.Embed()
# Set other fields
embed.set_image(url="attachment://file.png")  # Filename here must be exactly same as attachment filename.

After this, you can send an embed with an attachment to Discord:

await channel.send(file=file, embed=embed)

This example uses discord.TextChannel for sending, but any instance of discord.abc.Messageable can be used for sending.

maiden fable
#

Wait for like, 2 hours iirc before u restart your bot

tiny ibex
maiden fable
#

Using replit?

tiny ibex
maiden fable
#

Haha

sick birch
#

it's gonna get your bot ratelimited more frequently or api banned like this

tiny ibex
#

I can't host both of them on heroku

#

Cuz dynos

sick birch
#

both are pretty eh imo

tiny ibex
#

😕

sick birch
#

perhaps consider switching to AWS/Linode or something of that sort?

#

if you're planning to deploy of course

tiny ibex
sick birch
#

if you're only testing it it's not an issue, more of an annoyance than anything

sick birch
#

the only problem is the initial investment, which can vary depending on the model

sick birch
#

not necessarily

#

especially for a discord bot

tiny ibex
#

a 4 or 8 gig is slow

sick birch
#

for normal uses, yes

tiny ibex
sick birch
#

which is why you should put something such as ubuntu server on it and SSH into it

#

(that's what I do)

tiny ibex
#

You still can't have GBPS speeds

sick birch
#

perhaps

#

i'm pretty sure the pi 4 supports gigabit internet iirc

tiny ibex
#

lol

sick birch
#

difficult to get gigabit on wifi imo

tiny ibex
sick birch
#

even on normal devices, i'm subscribed to gigabit internet atm, but i only get about 300-500mbps

#

ethernet boosts it up to basically 960+

sick birch
#

well it's not all that bad

tiny ibex
#

-,-

sick birch
#

lmao

hollow agate
#
async def temprole(ctx, member: discord.Member = None, *, time, role: discord.Role = None):``` Let's say I do `.temprole @Someone#0171 5d 1264787129` would it keep the role integer (`1264787129`) stored as `{role}`?
boreal ravine
#

not really because you have an *

#

so the arguments will be stored in time

hollow agate
#

It seems to throw me an error without the * which is quite bizzare

#

Non-default argument follows default argument

fluid sand
#

who codes selfbots here

dusk pumice
#

what is tmep role?

#

Is it kinda thing for makin' role for some time and deleting that role?

fluid sand
#

I'm interested in python algorithms.

dusk pumice
#

Okay

fluid sand
#

k

#

u code selfbots

dusk pumice
unkempt canyonBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, or are malicious or inappropriate.

dusk pumice
#

against the ToS

fluid sand
#

ok

dusk pumice
#

So noone does

fluid sand
#

who codes bots

fluid sand
dusk pumice
#

almost eveyone in here

fluid sand
dusk pumice
fluid sand
#

can u nuke a server without perms

dusk pumice
#

What

fluid sand
#

@dusk pumice

dusk pumice
fluid sand
#

@fathom cipher

dusk pumice
#

you need perms or can't do that

fluid sand
keen lark
#

hello

dusk pumice
#

And stop pinging people

dusk pumice
fluid sand
fluid sand
dusk pumice
#

I will never beg nitro to ya

dusk pumice
keen lark
fluid sand
dusk pumice
#

...

fluid sand
dusk pumice
#

Soo unkind.

keen lark
dusk pumice
unkempt canyonBOT
keen lark
#

when I'm using it

slate swan
dusk pumice
#

XD

fluid sand
slate swan
#

ye, skid

fluid sand
#

i can't hack

#

am deadass

slate swan
#

"hack" 😭

fluid sand
#

@slate swan

slate swan
#

i dont get it

#

an embed with no color?

fluid sand
#

no

#

i need codes

#

for my bot

slate swan
#

youre not gonna get anything free here

dusk pumice
#

what codes

sick birch
#

then write it?

#

writing a python bot is actually quite easy

slate swan
#

he wants to get spoonfed

sick birch
#

cringe

slate swan
#

very

dusk pumice
fluid sand
sick birch
#

that's quite complex

#

well that's not the right term

#

quite nuanced, requires a fair bit of time to get it working just right

slate swan
#

its not something for his level

dusk pumice
fluid sand
sick birch
#

the github page contains excellent examples

slate swan
#

^

sick birch
#

(i authored one myself)

dusk pumice
sick birch
#

no

#

python docs won't help write a music bot, the github page and the discord.py documentation will

dusk pumice
slate swan
fluid sand
#

?

dusk pumice
#

Well there is code for music bot on replit so search for it too

slate swan
#

or how to call a function

sick birch
crystal wind
#

Melon

dusk pumice
#

Yes?

fluid sand
crystal wind
#

how did you highlight your text in your about me?

slate swan
#

😬

sick birch
dusk pumice
sick birch
#

or are you completely new to programming in python?

crystal wind
#

ah wait

#

just realized it was with "`"

dusk pumice
#

K

sick birch
#

Ugh

slate swan
sick birch
dusk pumice
sick birch
#

/examples/views/dropdown.py is by me :D

fluid sand
#

bro

#

drop some bot codes here

dusk pumice
sick birch
dusk pumice
fluid sand
#

i mean this

sick birch
#

People here don't give you the code that you need, we help you understand and write your code yourself.

sick birch
#

Copying random bot code off GitHub will not work well for you either.

sick birch
fluid sand
#

fix this code

dusk pumice
sick birch
#

do you have a specific section of your code that needs fixing?

sick birch
#

if so, we can help with that

unkempt canyonBOT
dusk pumice
#

Here is not for memes

sick birch
#

Please only come here with serious code questions relating to discord bots.

fluid sand
#

fix this

unkempt canyonBOT
#

Hey @fluid sand!

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:

https://paste.pythondiscord.com

sick birch
#

We won't fix it for you, we'll walk you through fixing it yourself

unkempt canyonBOT
#

Hey @fluid sand!

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:

https://paste.pythondiscord.com

sick birch
#

We'll also need a full traceback, and what you want it to do to be able to help as effectively as possible.

unkempt canyonBOT
#

Hey @fluid sand!

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:

https://paste.pythondiscord.com

boreal ravine
#

Stop

dusk pumice
sick birch
#

They're defenetely a troll, I'm humoring them in the dms just to see haha

slate swan
# dusk pumice XD `.txt` file for python code? LOL

When you try to send a message on Discord that is over 2'000 characters it converts your message in a text file called by default message.txt. In that case the user sent their code which was over 2'000 characters, so nothing to laugh about...

sick birch
slate swan
#

Not talking about the code, talking about the fact that Melon laughed about sending a .txt file for Python code

boreal ravine
#

hm

sick birch
dusk pumice
#

😄

slate swan
fluid sand
slate swan
slate swan
#

youre coming here begging for help but youre biting the hand that doesnt feed

fluid sand
#

ooh i see it is a 2v1

slate swan
#

Im so offended for being called a randompithink

slate swan
fluid sand
#

hope in dms

slate swan
sick birch
#

i haven't blocked you, just removed

fluid sand
slate swan
#

Im so offendedyert

fluid sand
#

lol

sick birch
#

i suggest you go waste people's time somewhere else

#

but if you really want to learn to make bots, learn basic python first

fluid sand
#

lol

slate swan
fluid sand
#

accept

sick birch
slate swan
fluid sand
#

it u wanna 2 v 1

sick birch
#

the guy's gonna post stupid questions in your dms

slate swan
sick birch
#

skids smh

slate swan
#

Time to bring up the popcorns 3HC_Popcorn

slate swan
slate swan
fluid sand
#

isn't it

slate swan
#

What are you gonna do spam ping mepithink

slate swan
#

Can you just move on and stick to topic, please..

sick birch
#

yes please

slate swan
slate swan
sick birch
#

it's clear you have 0 idea what you're talking about, i doubt you've even done programming before, so either 1. go do something else, 2. learn basic programming

fluid sand
supple thorn
#

Linx has the vibe of a 16 year old in their room selling robux for nitros or paypal

slate swan
sick birch
#

can someone get a mod for this

#

ablelist

slate swan
#

!mute 722723151708160030 Investigating.

unkempt canyonBOT
#

:incoming_envelope: :ok_hand: applied mute to @fluid sand until <t:1636092314:f> (59 minutes and 59 seconds).

supple thorn
#

Has a scam discord server of 5k child members

sick birch
#

thank you

slate swan
#

🕊

slate swan
slate swan
sick birch
supple thorn
sick birch
#

luckily i got off, i just hit the wrong key and pinged all the admins rather than a guy i meant to ping

slate swan
sick birch
#

anyway back on track

slate swan
slate swan
slate swan
#

Was resolved thopithink

#

Anybody have command ideas i have 0

#

@slate swan@sick birch@slate swan do note that some of your comments were disruptive or disrespectful - please ping moderators in the future and disengage

slate swan
#

understood

boreal ravine
#

😂

slate swan
covert igloo
#

Is there a way to get a tweet sent by a specific user

#

With dpy

boreal ravine
#

tweet?

covert igloo
#

Yeah, not sure if I can request for it

slate swan
#

Yes you can, by using the library tweepy

jade tartan
#

Any one help me with my error

supple thorn
jade tartan
slate swan
#

If you don't give code and/or errors we can't do anything for you, sorry

jade tartan
#

Whats the await term to add a emoji/reaction?

#

to an embed

inner geyser
#

hey there, actually I was trying to read a image using aiohttp, and writing to the file using aiofiles but I was continuously getting this error

a bytes-like object is required, not 'StreamReader'

My code -

async with aiohttp.ClientSession() as session:
            async with session.get(f'https://some-random-api.ml/canvas/jail?avatar={user.avatar_url}') as r:
                async with aiofiles.open('image.png', 'wb') as resp:
                    try:
                        await resp.write(r.content)
                    except Exception as e:
                        print(e)
inner geyser
slate swan
#

youd need to assign your message to a variable

#

and use add_reaction() on it (with await)

slate swan
#

still, youre missing the message object

slate swan
unkempt canyonBOT
#

await add_reaction(emoji)```
This function is a [*coroutine*](https://docs.python.org/3/library/asyncio-task.html#coroutine).

Add a reaction to the message.

The emoji may be a unicode emoji or a custom guild [`Emoji`](https://discordpy.readthedocs.io/en/master/api.html#discord.Emoji "discord.Emoji").

You must have the [`read_message_history`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.read_message_history "discord.Permissions.read_message_history") permission to use this. If nobody else has reacted to the message using this emoji, the [`add_reactions`](https://discordpy.readthedocs.io/en/master/api.html#discord.Permissions.add_reactions "discord.Permissions.add_reactions") permission is required.
slate swan
#

Use add_reaction on a Message object

#

Yup

jade tartan
distant spear
#

anyone creating discord bots ?

#

what this server created for ?

waxen granite
#

"This is the message" what can i do to consider this is a message between " " as 1 msg or phrase?

slate swan
#

!e
import re
x = re.findall('"([^"]*)"', '"Hello world"')
print(x)

unkempt canyonBOT
#

@slate swan :white_check_mark: Your eval job has completed with return code 0.

['Hello world']
boreal ravine
maiden fable
#

Yes

slate swan
#

No

maiden fable
boreal ravine
#

yes

dense swallow
#

yes

maiden fable
#

Ok ok calm down now

#

Don't start a chain

boreal ravine
#

barely three words lol

loud junco
#
async def show_help():
  await message.channel.send('-rpm hunt/mine')
  await message.channel.send('-rpm craft')
  await message.channel.send('-rpm boss/defraid')
  await message.channel.send('-rpm cd')
  await message.channel.send('-rpm p')
  await message.channel.send('-rpm inv')

    if message.content.startswith('rpm help'):
        asyncio.run(show_help())
thick sigil
#

what the fuck is that

loud junco
#

how do i do it correctly

maiden fable
#

No need of asyncio.run inside an async function

loud junco
#

i messed up this thing

maiden fable
#

Just do await show_help()

loud junco
#

:)

#

lemme try ur method

maiden fable
#

Then they told it wrong 😐

loud junco
#

what about this

async def show_help():
  await message.channel.send('-rpm hunt/mine')
  await message.channel.send('-rpm craft')
  await message.channel.send('-rpm boss/defraid')
  await message.channel.send('-rpm cd')
  await message.channel.send('-rpm p')
  await message.channel.send('-rpm inv')
#

this is error

boreal ravine
#

define message

maiden fable
#

I also said so lol

loud junco
#

how to define

boreal ravine
#

yes he didnt do it still

boreal ravine
thick sigil
#

And why making your bot spamming messages

loud junco
#

i cant do ('''
''')

maiden fable
#

Just use newline char

#

\n lol

loud junco
#

oo ok thanks lol

thick sigil
#

You can

maiden fable
#

!e print("1\n2")

unkempt canyonBOT
#

@maiden fable :white_check_mark: Your eval job has completed with return code 0.

001 | 1
002 | 2
thick sigil
#

or subclass help command

maiden fable
#

Yea that too

#

Me who made my help command with bot.command deco: 😐

thick sigil
manic wing
#

subclassing help is overrated

maiden fable
manic wing
#

whos Kai

loud junco
#
if message.content.startswith('rpm hunt'):
        await message.channel.send('looks like there is no animals around')

why syntax error

#

on the :

#

it shouldnt be

maiden fable
unkempt canyonBOT
#

class discord.ext.commands.Command(*args, **kwargs)```
A class that implements the protocol for a bot text command.

These are not created manually, instead they are created via the decorator or functional interface.
loud junco
#

lemme read it

slate swan
#

Let's fix this

loud junco
#
async def show_help():
  await message.channel.send('-rpm hunt/mine\n-rpm craft\n-rpm boss/defraid\n-rpm cd\n-rpm p\n-rpm inv')
#

is it like this?

#

or should i do spacing

slate swan
#
@bot.command() # define our command
async def hi(ctx):
#however this works
  await ctx.send("H")
#

Like this

boreal yarrow
#

or @client.command(), however you've defined it

loud junco
#

=.=

slate swan
#
client = discord.Client()
bot = discord.Client()
#

The way you defined it..

#

It should work though...

loud junco
#

i do it this way

#
import discord
import os

client = discord.Client()
############################################################

async def show_help():
  await message.channel.send('-rpm hunt/mine\n-rpm craft\n-rpm boss/defraid\n-rpm cd\n-rpm p\n-rpm inv')
boreal yarrow
#

message is not defined tho?

loud junco
#

no

slate swan
#

That is incorrect

loud junco
#

i mean

slate swan
#

If you use message then incorrect

loud junco
slate swan
#

Wait, yes!

loud junco
#

why is this getting syntax error