#discord-bots

1 messages Β· Page 425 of 1

gritty inlet
#

And generally libs tend to use it for clarity, even if it's internal code

#

Same reason for using Literal in some contexts

#

I'm personally strict about typing. You don't have to be. It was just a recommendation

#

As long as you do the minimal typing it's good (:

fast osprey
#

Personally I really just use python for hobby, quick prototype stuff. If I cared enough about proper typing and extensibility with a team, I'd choose a strictly typed language

gritty inlet
#

I just got used to strict type checker ever since I turned it on geekstar

#

And I find it fun atp

grave sandal
#

I think I follow most of that. Strictly for type checking no impact at runtime. But that's making me wonder, can you construct Data and just say Data(id="abc", name="def") and skip banner, are there constructors?

gritty inlet
#

You don't have to use banner if you don't want to

#

You're meant to take Discord's payload and just pass it to the class that takes that TypedDict

#

You shouldn't hand-feed that dict yourself

#

You can just ignore certain keys. But removing them is pointless

grave sandal
#

It isn't really pointless for my use case though where the goal is to just get a in memory discord backend operational that only has to store and feed in minimal information/skip over what the code doesn't interact with or need.

gritty inlet
#

At the end of the day the endpoints still give you those keys. What're you gonna do with that

#

Just don't define the keys in the TypedDict then ig

#

Doesn't impact memory really

#

Also if you really care about memory make sure to use __slots__ thumbsup

#

Python should have a way to auto implement slots :\

grave sandal
# gritty inlet You don't have to use banner if you don't want to

I see that with TypedDict, this works fine, but it doesn't with dataclasses and Optional[] requires you still pass them.

class Data(TypedDict):
    id: str
    name: str
    banner: NotRequired[str]


my_data = Data(id="abc", name="def")
print(my_data)```
```py
@datclass
class Data
  id: str
  name: str
  banner: Optional[str]

^^ requires me to fill in all the optionals myself unlike TypedDict

gritty inlet
#

You should just use it as an annotation

grave sandal
#

I don't think using it like this is wrong?? It ends up with a dictionary with the same information and constructing it with constructor syntax. I'm also using pycharm where this is more ergonomic.

gritty inlet
#

payload: Data = ...

class User:
  def __init__(self, data: Data) -> None:
    self.thing_you_care_about = data["thing"]
    # Just don't access what you don't need.
    # Moreover, you don't have to define all keys in the typeddict. It has no runtime check.

user = User(payload)
delicate flame
gritty inlet
#

I don't think TypedDicts are meant to be treated as runtime objects. Surely wouldn't construct them.

#

You just don't really need to anyway

delicate flame
#

I use them for the Unpack type

gritty inlet
grave sandal
#

They have constructors which you can use at runtime, just not runtime checks on the data. If I passs the fields in the constructor I get an object that is a dictionary.

delicate flame
#

not their only usage though

#

they're fine as runtime objects with constructors

grave sandal
#

or maybe constructor is the wrong word

gritty inlet
#

Why do you need to construct them, if anything, you're just bloating the memory more by creating another dict in-memory

grave sandal
delicate flame
#

by construct I mean MyTypedDict()

gritty inlet
#

The payload with keys that you don't want will not stay in memory, so I wouldn't worry about this

grave sandal
#

I'm not intending to argue about typed dicts which I've probably misunderstood, only was curious how different they are. scurrypy uses data classes and I thought defaults of None, which they'll get filled in with later anyway, would be convenient, no memory difference in that case. But If I understand correctly, @delicate flame objects to it, as default values of None at the constructor would complicate inheritance if needed in the future, so the convenience I wish for isn't advisable.

gritty inlet
#

You could use a regular class to avoid that ig

delicate flame
#

parts will do what you're looking for. But there's no user part. Models were meant to be filled by discord, not by the user. That's why they dont have none defaults

#

hm. crazy maybe not so crazy idea. Why not do UserModel.from_dict({}) for all fields set to None then fill out as you need

gritty inlet
#

Because this has the same effect of unpacking

grave sandal
gritty inlet
#

You can pass the full dict and if you don't care about some keys then yeah make them have a default.
Would not recommend this but go for it ig

grave sandal
#

@delicate flame I like that somewhat. But from_dict doesn't have a a type annotation that helps my IDE. And when I do have it right, I no longer know what is optional and what isn't. The way I vaguely see it, scurrypy is marketed as dataclass driven, so fundamentally, two clients for discord should be able to use the same models, making it a desirable layer to build on or play around with in it's own right, so I would argue, if practical, which it might not be due to inheritance concerns, it should be something given care like everything else. But I'll understand if you don't intend anything besides your own client to be doing much with it, or share the same concerns. I already know what I have to enter, that it can be None, it's not a big deal at all for it to not. I can look at scurrypy and get a good idea of what is and isn't essential on discord and It can make life easier playing around or experimenting with all that.

delicate flame
#

oh are you trying to get your IDE to only show the fields you filled?

grave sandal
delicate flame
#

oh, this seems like more of an IDE issue than a scurrypy issue. It looks like thats just how the IDE shows the fields. if your IDE isnt giving you what you need, reference the docs! Those will tell you if fields are optional or not. Thats what the docs are there for!

grave sandal
# delicate flame oh, this seems like more of an IDE issue than a scurrypy issue. It looks like th...

When I use my IDE and the constructor it does tell me, but even if i did hover for them I don't think any of them would be smart enough to know, that setting attribute by attribute, this is required, or you're missing this one. This isn't really a technical requirement, just a developer experience issue I potentially see it as. Ideally I don't have to see any docs, I just start typing and hover for what i need and life is smooth. I feel like I've made my argument at this point and attribute: Optional[type] = None isn't going to be a thing so I'll just keep that in mind and enter None for each manually (which I am translating it by writing it, I just thought defaults/less would be nice, that's all). Thank you for taking the time to try to understand my issue and giving your feedback. πŸŽ‰

delicate flame
#

np! wish I could be of more assistance, but reading docs is an inherent part of coding. Theres not much I can do about that

stark ingot
#

The docs dont say that it wont ever be present in normal payloads.

fast osprey
#

and if it is, the libraries can be changed Thonk

delicate flame
#

I have no problem changing it. Im releasing a new version at some point soon anyway

stark ingot
#

Why wait until something changes and scramble to implement a feature instead of implementing it according to spec the first time

fast osprey
#

"until" implies that it will. Nothing is implying that it even might

#

In this specific instance, there's a very deliberate reason why the user object sent to bots that simply share a server would differ from what they get on an oauth grant. The chances that they'd expand out the former is highly unlikely

stark ingot
#

Nothing implies that it wont. Its not like it is that hard to implement and one boolean is not going to make a difference

#

If you are concerned about memory, you can abstract it out into its own class along with the other OAuth specific fields, and you can set them. And then have them be related by composition.

fast osprey
#

The fact that mfa being enabled is sensitive information does imply that it won't

stark ingot
#

where?

fast osprey
#

That's the nature of the field

#

It's sensitive. That's not something discord would want bots to be able to farm for free off people

stark ingot
#

and you got this information from?

fast osprey
#

It's also not something that shows up on the human user side of the API either when you see a global profile

#

From applying critical thinking...?

stark ingot
#

Im not sure how you can actually know what "discord would want" unless you work there. And even then, things can change

#

I will agree with you when there is a note in the documentation that specifies that "X fields will only be present in Y scenario"

fast osprey
#

I mean if the tradeoff you want to make is providing a confusing field that is empty 100% of the time AND there is a very clear, logical reason why it should be just because in theory they could add it, that certainly is a choice

#

That is one I would not make and I am glad that dpy doesn't make

stark ingot
#

"Surely discord will never use a different port for voice because this is the port that always has been used"

fast osprey
#

Ports are arbitrary numbers. Whether or not a bot gets access to sensitive information for free is a much more substantial decision

#

and not one to be made lightly or without warning

stark ingot
#

No warning necessary, it is already documented that bots could receive this information at any time

delicate flame
#

if the field is always none, sensitive information is not even in the picture. I already said I would change it? Why yall getting so up in arms over this

#

worse case scenario: its always none

fast osprey
#

"Could" is doing a hell of a lot of heavy lifting. A meteor could hit their datacenter, and that would be a substantial change without warning

delicate flame
#

it was a mistake I made and one that is very fixable

fast osprey
#

The fact of the matter is that it is incredibly unlikely to change, and even if it did you're inflating the cost of adding it and downplaying the cost of putting it in when it's actively misleading

stark ingot
#

"unlikely" is doing a lot of heavy lifting

delicate flame
#

I dont get why you're taking this so personally. It boils down to an extra field that happens to be none. if you have an issue about it, open an issue?

fast osprey
#

Can you articulate a potential reason why discord would decide that bots which users have not authorized should know if they have mfa enabled or not

#

Or are we speculating that discord just spends all day flipping coins to decide to make completely random decisions

stark ingot
#

They want to let bots with moderation command have the same level of security as the built in actions.

delicate flame
fast osprey
fast osprey
delicate flame
#

yes, you've already made this clear

fast osprey
#

I was clarifying since you said something different

#

so I don't think it's clear

haughty prairie
#

holy shit this dude sassy 😭 im gonna assume larp too after coming out the gate with this

#

😭 😭 😭 😭 yo im weak

delicate flame
#

heh, isnt that what a bot does tho? Include a jumble of features you like?

haughty prairie
#

I agree

grave sandal
#

What are we arguing about, are we for or against mfa enabled being on the user model? What's wrong with just having it there so you can load it if you ever use oauth? @delicate flame goal for the library is correctness and alignment with the API so I think it makes sense to have it there if you want it.

haughty prairie
#

It should not be on a public facing user model no

#

I didn't read through all that, what would you need to know that about someone for?

haughty prairie
grave sandal
haughty prairie
#

Oh yea I'd agree

grave sandal
haughty prairie
#

Or atleast share a base class and inherit the properties

haughty prairie
#

I know larp replies when I see one

grave sandal
#

Mountain out of mole hill

fast osprey
#

In theory one could use it to respect a server's MFA requirements for moderation actions, not that 99% of the people rewriting ban commands bother with that

grave sandal
#

@fast osprey I think we agree, yea. But the goal of scurrypy is mainly to be accurate to discord, if I for example want to start dealing with oauth stuff and read it, that library is just there and will work, even if that field isn't used in like 99% of cases, it's API accurate and there.

fast osprey
#

If you're making a library that's oauth enabled then go nuts

#

iirc the whole thing that started this off was a question of why dpy (and by extension other bot-specific libraries) don't

delicate flame
#

the culprit

#

twas but a mere mention

fast osprey
#

Probably just two very similar sounding but very different questions getting jumbled together lol

grave sandal
grave sandal
# delicate flame the culprit

It's API accurate, an off the shelf discord model, use wherever, build what you want on top, which happenstancially the main application of it will be the normal API/gateway stuff.

The rest of the arguments I haven't really followed, which is why I grabbed it, if I wanted to go deal with oauth it would be less convenient if scurrypy didn't have it, or when the goal is to be accurate to the API, puts it elsewhere.

gritty inlet
#

Be accurate if you want, it costs you memory and maybe confusion

fast osprey
#

I think maybe there's a misunderstanding. From what I can tell they're talking about making a more holistic discord library, not strictly a gateway bot one, in which case this attribute could potentially be populated and useful

remote solar
#

hello

#

i want to learn creating discord bots

delicate flame
vocal plover
#

Yeah, memory is a very very weak argument to use here, if one bool on a model is a memory concern then it's probably time to switch language tbh

fast osprey
# remote solar i want to learn creating discord bots

Best of luck, your first best step is to get a good amount of practice with whatever language you'd like to use to make it and learn the fundamentals. Then the different discord libraries will have examples/getting started tutorials

gritty inlet
gritty inlet
#

Also when do you ever need to create an instance of a context menu the way he does? I only ever used the decorator

#

Is it even meant to be done

abstract kindle
#

is there a decent way to test slash commands automatically? like is there a library that works with discord.py that I can write a test suite so I don't have to manually test my slash commands every time?

fast osprey
#

Can separate the logic into a simple helper function and use any unit testing framework you'd like

#

mocking out discord itself is prohibitively heavy imo

woeful hill
gritty inlet
woeful hill
#

yeah, that's what i did

gritty inlet
#
class MyCog(Cog):
  ...
  @app_commands.context_menu(name="My Context Menu")
  async def my_context_menu(...): ...
gritty inlet
#

Why wouldn't it work just like a normal command

woeful hill
#

i think one of the maintainers said it's annoying to do something with self for context_menu

gritty inlet
#

Nah I'm jk but still sounds weird

fast osprey
#

There's a long writeup on a github issue about why this is more trouble than it's worth

#

I can guarantee you the devs didn't just decide to make this work differently for context menus for shits and giggles

gritty inlet
#

Might take a look at it

fast osprey
#

well shit guess they deleted the issue :/

whole shoal
#

apparently my discord bot is using a lot of mem

CPU Usage: 1.0%
Memory Usage: 814.39 MB
Uptime: 5 days, 12 hours, 21 minutes, 57 seconds

On Startup Its around ~400 MB

πŸ€” Wondering whats causing the jumps in just 5 days of op

fast osprey
#

Good start would be to use a memory profiler

whole shoal
#

and yeah using that apparently sent the mem usage to 1.66 GB

fast osprey
#

there should be some async friendly profilers, haven't needed to do this in a while tbh

whole shoal
#

i think there is Scalene but it might just slow down the bot

fast osprey
#

Well if you're running out of memory, slowing things down probably isn't your biggest concern

whole shoal
fast osprey
#

Not sure if you have any other options besides a) run the profiler and live with it being slow b) look at your code and try to intuit what's happening or c) nothing

#

if you wanna send code we can take a look at it but it won't be definitive

whole shoal
#

the code is ehh over 40k lines split across files

#

dont think theres any runtime cache being added beisdes what the library and python adds up

fast osprey
#

Do you use views?

whole shoal
#

yeah a lot actully

fast osprey
#

Then you're adding things to the cache

#

In theory any of your code could be keeping stuff in memory too, but probably the most common leak just using the library is adding an increasing number of persistent views

#

or things naturally being cached like members

whole shoal
#

πŸ€” is there any controls over what is being cached by the library

fast osprey
#

Intents

#

if you don't request an intent, the library won't cache the relevant objects

#

The other lever is the message cache but that already has an upper limit by default so I doubt that's it

whole shoal
#

tbh none of my views are persistent, they all timeout after a while

#

ill try using pyspy to see if it works

fast osprey
#

Is the memory usage monotonically increasing or is it spiking?

whole shoal
#

gradually increasing over time

fast osprey
#

Then my guess is it's your own memory leak or potentially member cache

whole shoal
#

mhm yeah im trying to get a profile of the mem rn

stark ingot
#

Member cache might have something to do with it. Py-cord has some flags to control what members are cached. You could check to see if the library you are using does as well.

whole shoal
whole shoal
fast osprey
#

Are you in several/large guilds?

#

You can if you wanted not chunk all of them except that one

grave sandal
# abstract kindle is there a decent way to test slash commands automatically? like is there a libr...

I'm working on one myself but it's awhile off still. What you want is acceptance tests for your discord bot which requires faking discord with an in memory database and models a way to set stuff up. Optionally an actual gateway and api. But to put short it's a decent amount of work that no one has put in yet, there was dpytest which didn't do slash commands and doesn't seem to work anymore. So to answer your question, no, you'll have to make something or wait for something.

gritty inlet
#

Or any local AI models, not only LLMs

timber dragon
#

Tests usually just check the values, so you just need a fake interaction object etc

grave sandal
# timber dragon Tests usually just check the values, so you just need a fake interaction object ...

It's not really wild for acceptance tests and for something that is supposed to integrate with discord though. If I'm writing a bot I don't want to worry about setting up objects or only testing specific interactions. I want to write tests that definitively say when the bot joins a guild, a user @s it, it will reply to that user with hello. Or when I run this slash command, I'll get a message in response, through the whole journey of a real bot or user would. Or maybe even use the same to see if the bot is setup for real when deployed to a server making it use a fake gateway/API to verify deployments.

timber dragon
#

Fair

grave sandal
fast osprey
#

If you look at the entirety of the bot api, it's a lot. I'd rather just encapsulate the important logic into helper methods and test that

#

It's also the case that this isn't b2b enterprise software we're building here, 99% of it is hobbyists and the other 1% are still selling to the average discord user who isn't holding them to SLAs. That level of testing coverage is pretty overkill IMO

grave sandal
#

You don't need the entirety of it though, and testing individual methods doesn't tell you that everything together is correct. Enterprise or not It can be a more enjoyable experience to write tests that tell you definitely your bot works.

gritty inlet
#

For me running a slash command by hand isn't a big deal, depends on what you wanna test really

fast osprey
#

You're welcome to do that, I'm just saying I personally think that effort isn't best spent on stability and testing

#

The average kid installing your bot isn't going to care what your testing coverage is

#

If the choice is mock out discord or build another feature I'm doing the latter

grave sandal
gritty inlet
#

That's all I need

grave sandal
grave sandal
# fast osprey If the choice is mock out discord or build another feature I'm doing the latter

This is a fair and realistic choice but I think it also varies with testing mindset. I don't immediately have to develop anything personally, but when I do, I generally prefer automated testing to be the highest priority. If I test core logic it'll probably be with an in memory database/fakes of other stuff. If I test the whole application (which I do for web apps/servers at this point) it'll be with the real thing. I can't completely say the time isn't better spent on writing features, but I'd just really rather have luxuries here that I have elsewhere, and I'd like to be in a position where there's a situation like this I have the experience to fake something else, like telegram, or who knows what will come up.

gritty inlet
#

It's just some interactions
Idk what do you gain from automating those as you can see results even after one occurance

#

But go ahead Ig

#

Unless you want to test your whole framework or such

stark ingot
fast osprey
#

If it's a solo dev writing on a single branch and the audience is discord kids, the need for that isn't as high

grave sandal
#

Someone in here came in asking if they could use a testing framework to know if the command they setup works or not though... that kind of fast automated feedback without having to hop on places as you're developing is something everyone could enjoy, team or not.

#

Automated testing, of any form, if desired, isn't just for teams

fast osprey
#

It's not just for teams, my point was that it becomes necessary at that point not that it's not valuable otherwise

grave sandal
# stark ingot How do you go about this? Do you send a json request and then look at the json r...

My approach is to build a harness that goes over the discord.py client, it calls the setup hooks and then you can send the client whichever events and it'll get to your handlers. This harness also have an interface you interact with in your tests, stuff like create guild, join guild, etc. This isn't touching an actual gateway yet/sockets.

Basically, the tests look like sending a message as someone else, that gets fed into your bot, your bot sends a message out through the interface interacting with the fake backend, then you can check the backend and check something like "did this bot reply to this user" It's still a work in progress.

fast osprey
#

If I could wave a wand and have a testing suite in place, nobody is saying that would be a bad thing. We're talking about tradeoffs, when unpaid solo devs need to decide to write a testing suite which nobody else will benefit from or build a new feature

grave sandal
#

@stark ingot This is in early stages and could be a lot better

fast osprey
#

Would be interesting if someone made an ergonomic framework to plug in test cases easily, that bar has to be lowered quite a bit for the average hobbyist to want to invest in it

grave sandal
stark ingot
#

Interesting
Those are some long function names though XD

timber dragon
#

I wanted to write a test extension like dpytest but quickly realised how many objects I had to mock and just gave up lol

grave sandal
# timber dragon I wanted to write a test extension like dpytest but quickly realised how many ob...

I started with that one but as is it didn't work for me. I borrowed some of the classes it had like it's fake connection state and stuff to get started on an initial version, threw the code away, started fresh and it turned out I didn't even need them for the parts that never make any calls to discord. Like if you just want to get to a ready event you don't have to mock anything, you just call the setup hook and then pass your events in for connection state to parse.

timber dragon
#

Yeah true
I didn't even think that far (or close) yet

#

I started with on_message so you could do the following

message = await channel.send("hello")
assert message.content == "hello"
grave sandal
grave sandal
timber dragon
#

I guess you wouldn't await it but yes it would return a mocked message obj that you could check like as if it was returned from discord

grave sandal
#

For some of it for sure. But I got too ahead of myself initially because I was putting together a lot of classes and design i didn't really need, before even getting anything to the client or seeing if much would work. I mean this part alone this time around was smart because it made the rest easier to build and test actually. All my tests just take the database, which is in memory anyway, then test if stuff is updated in it. So when you call the special interface for the tests like create a guild, you can be like, does a guild with this name exist? is this user part of it?

whole shoal
whole shoal
gritty inlet
fast osprey
#

I wouldn't do it in on_ready given how on_ready works

gritty inlet
#

I mean I think you can't even do bot.get_guild in setup_hook

fast osprey
#

setup_hook can spawn an asyncio task that internally uses wait_until_ready though

grave sandal
# timber dragon See, that's smart

My unit tests for all the pieces follow the same design as the harness overall. Basically, you don't have to write tests specifying what responses you want from anything you're working with, everything is like fresh and real for your tests, so you just bring everything into the state you want. To test parts of the harness I just use implementations that will act like the real thing by using the in memory version. And I have tests for the whole thing, like end to end tests for my discord testing framework or whatever you'd call it, so that I know the thing I'm supposed to be building actually works, and not just a lot of code to get there that won't necessarily be in use, i.e. https://github.com/RequiemWorld/discord_harness/blob/main/tests/scenarios/test_join_guild_and_initialize.py.

whole shoal
#

πŸ€” so that wouldn't cache guild members data right?

gritty inlet
fast osprey
#

because on_ready fires repeatedly

#

the task only runs once

gritty inlet
rotund violet
#

Hey is there any repo of issue I can get?

gritty inlet
whole shoal
#

Cool thanks I'll set that up and monitor the usage for a few days

gritty inlet
#

Like I could make a print statement to check

gritty inlet
rotund violet
gritty inlet
#

I'm not 100% sure what this does but it's something

#

You can pass that to the bot class too

whole shoal
#

Mhm, might keep that untouched for now, will try if the guild chunking disabled works and then if it's still increasing, update that

gritty inlet
#

How many guilds you're in?

#

Like the bot

whole shoal
#

500 ish

gritty inlet
#

Ah then it wouldn't be a huge change

#

Because chunking at thousands of guilds is super slow and a lot

fast osprey
unkempt canyonBOT
#

discord.on_ready()```
Called when the client is done preparing the data received from Discord. Usually after login is successful and the [`Client.guilds`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Client.guilds) and co. are filled up.

Warning

This function is not guaranteed to be the first event called. Likewise, this function is **not** guaranteed to only be called once. This library implements reconnection logic and thus will end up calling this event whenever a RESUME request fails.
gritty inlet
#

Unless you have a few big servers there

fast osprey
#

no it runs several times and randomly

gritty inlet
whole shoal
#

Also, why did my bots presence status just didnt load this time

gritty inlet
#

I only use it for initial logging

fast osprey
#

I'd recommend not using on_ready for basically anything

gritty inlet
#

Yeah though this isn't much

fast osprey
#

There's very few use-cases that it's viable for, and none that a vast majority of devs will run into. Really it's only suitable for when you care about temporary disconnects and cache being repopulated

grave sandal
gritty inlet
#

If you have anything in it that you'd only want to run once, then be aware the event may be fired multiple times

grave sandal
#

Ahhhh, I see

fast osprey
#

The event fires every time cache is populated. Which does include initial startup/connection, but also every time there's a temporary disconnect and reconnect when cache needs to be batch repopulated. So while printing every time that happens is far, far from the worst thing you could be doing it's generally from a miscommunication of what the event means

delicate flame
#

last I checked, the ready event only gives ID and if the guild is temporarily unavailable. Its not until subsequent GUILD_CREATE events you get the guild's name

grave sandal
fossil jungle
#

Who's gonna help me to create a bot

#

Cus I need it

#

in my server

fast vapor
#

Ask the question directly please

#

Are you looking for a person to collaborate with?

fast osprey
#

You can help yourself the most

#

get started, ask questions where you get stuck. Or pay someone

wise fog
#

How could fun be achieved with a Discord bot that lets you pvp duel other people? I made some avatars and weapons but I mean, there are no real controls. It's just 2 images fighting eachother.

fast osprey
#

what would you find fun? This is a pretty subjective thing

#

probably worth going into communities that engage with that sorta thing and seeing what they like/dislike

gritty inlet
#

Maybe by making it an activity

#

Otherwise you could just take inspiration from other bots' systems as long as you don't copy-paste

wise fog
#

Fair enough, thanks for the responses!

stark ingot
#

Discord messages don't really cater to any live action. You could go for a turn based system like Pokemon

fast osprey
#

This ^ tbh, it's super clunky especially since activities exist now

maiden violet
#

!res

unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

drifting rain
#

anyone have a code for /embed command?

fast osprey
#

Would be good to describe what you want this command to do, and also good for you to build it yourself with help

snow minnow
#

How exactly would the more experienced programmers approach this structure? I'm working on a bot that can provide study notes for books of the Bible. Should I approach it as one file = one book (or book+chapter) containing many note blocks, including single verses and verse ranges with the markdown already implemented in the notes themselves so that when the bot embeds the response, it already has proper formatting? Or should I do something like individual folders/files for each book/chapter/verse? Or something else entirely, like maybe just one big file that has everything in the first suggestion in it?

#

Here is an example of the markdown included in the verse so that the formatting comes out correctly when the bot replies with it:

stark ingot
#

Is it a static embed?
What code have you tried so far?

drifting rain
#

import discord
from discord.ext import commands
from discord import app_commands

=====================

CONFIGURATION

=====================

GUILD_ID = 1463610871111475723 # your server ID
BOT_TOKEN = "YOUR_BOT_TOKEN" # replace with your bot token

=====================

BOT SETUP

=====================

intents = discord.Intents.default()

class MyBot(commands.Bot):
def init(self):
super().init(command_prefix="!", intents=intents)
self.tree = app_commands.CommandTree(self)

async def setup_hook(self):
    # sync slash commands to your guild (instant)
    guild = discord.Object(id=GUILD_ID)
    self.tree.copy_global_to(guild=guild)
    await self.tree.sync(guild=guild)
    print("βœ… Slash commands synced!")

bot = MyBot()

=====================

PREFIX COMMAND

=====================

@bot.command()
async def sayembed(ctx, title: str, *, description: str):
"""Send an embed using !sayembed"""
embed = discord.Embed(
title=title,
description=description,
color=discord.Color.blurple()
)
embed.set_author(name=ctx.author.name, icon_url=ctx.author.avatar.url)
await ctx.send(embed=embed)

=====================

SLASH COMMAND

=====================

@bot.tree.command(
name="sayembed",
description="Send a custom embed",
guild=discord.Object(id=GUILD_ID) # guild-only for instant sync
)
async def sayembed_slash(interaction: discord.Interaction, title: str, description: str):
embed = discord.Embed(
title=title,
description=description,
color=discord.Color.blurple()
)
embed.set_author(name=interaction.user.name, icon_url=interaction.user.avatar.url)
await interaction.response.send_message(embed=embed)

=====================

RUN BOT

=====================

bot.run(BOT_TOKEN)

stark ingot
#

I was talking to b3nukqs, sorry

stark ingot
drifting rain
#

no bro this is my first time doing a bot or coding

stark ingot
#

You need to learn the basics of python before making a bot. Discord bots are intermediate level projects.

#

!res

unkempt canyonBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

tawny horizon
#

LOOKING FOR BOT DEVS

Hello everyone, im looking for anyone who's intrested to work with me on a discord voice assistant bot,

basically my idea is that, the bot will join your vc on your command and then it will basically act like a alexa but for discord. The few features i have in mind are first of all playing music, googling things, and later stages we can implement a llm to make it act as a chatbox

the internal planning as of now which ive made is, the bot will be fed the audio stream and using a wakeword detector we will detect when the wakeword for the bot is spoken, that means "hey Alexa". after this the bot will activate and start recording, then we can feed the audio to a STT model such as openai whisper which then can be fed into intents which will decide the task to do and that will perform the task, this is the basic idea.

I initially planned to do this solo, but as i have no expertise in audio parsing, or the discord bot genre in general as i usually develop different stuff, I want someone who is experienced in the discord bot building and is willing to explore with me as im clueless how to do this.

The bot wont be anything commercial, I planned it for me and my friends server, but its your choice if you want to deploy the bot publically for yourself.

Please read the entire thing before dming
i dont want too many people maybe 1 or 2 at max, as i was planning to do it solo at first

Thanks

sick birch
#

this sort of thing isn’t really allowed on the servers. you might want to check with mods

tawny horizon
#

its not for commercial purposes, not am i hiring anyone, i wont be paying anyone its just a fun project which i thought was too hard for me to do alone so i posted this

#

i think that might be fine to post, if its not thats fine ill remove it

fast osprey
#

As friendly advice, anyone who remotely values their own skill and time is incredibly unlikely to donate those to a rando

#

Natural speech voice recognition is something even the likes of Apple and Google struggle with. Getting it working with a pair of hobbyist devs is very wishful thinking

stark ingot
#

Idk about trigger words but Whisper seems to work decently well for a hobby project

fast osprey
#

When Apple hires legions of six figure senior devs and Siri still can't understand when I want to set a goddamn timer, I wouldn't put my money on the two people doing it in their free time KEK

tawny horizon
#

till now it seems doable because the wakeword trigger kind of works

fast osprey
#

I mean that's a lot to ask a stranger to donate their limited time for something you have no faith in working

#

There are millions of "idea guys" out there

tawny horizon
fast osprey
#

Best of luck, at the minimum you can learn a lot prettythumbsup

snow minnow
#

I tend to get hung up on methodology more so than I do the actual coding.

fast osprey
#

ChatGPT thinks that 3 isn't a prime number sometimes

snow minnow
#

I hate having to reference it for anything because of all of it's hallucinations, but felt this question about methodology couldn't hurt lol

fast osprey
#

Hallucination is a really cute euphemism for lying

#

YAML is a totally fine config format, but probably overkill given how flat your data is and that it isn't ever going to change

snow minnow
#

That's what I was thinking initially, but it did say that a flat file could end up with regex soup when doing verse ranges.

fast osprey
#

I'd suggest a single file structured as closely as possible to how you intend this to be stored in memory, assuming that this data is small enough to just be shoved into a data structure. A sqlite db file would be fine

snow minnow
#

Oh, yeah. The entirety of the whole project is probably about 5MB total, so it should be fine to run completely in RAM.

fast osprey
#

It also depends on how you want to optimize lookups on this

#

If the lookups are just key -> chunk of text, making a config file/db with that key and just loading it into a dictionary would be my suggestion IMO. If you are doing free search within the containing text, you may want other data structures

#

But 5MB is so small that any optimizations beyond that really won't matter

celest pelican
unkempt canyonBOT
#
Command: embed

Send the input within an embed to either a specified channel or the current channel.

Source Code
full mango
mighty pilot
#
class reporting(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @app_commands.command()
    async def report(self, interaction:discord.Interaction):
        '''Report anonymously'''
        await interaction.response.send_modal(anonreport())
    
class anonreport(discord.ui.Modal, title='Anon reporting'):
    who = discord.ui.TextInput(
        label = 'Who would you like to report?',
        placeholder = 'Username goes here',
        required = True)
    why = discord.ui.TextInput(
        label = 'Why are you reporting them?',
        style = discord.TextStyle.long,
        placeholder = 'Please give a detailed reason for reporting',
        required = True)
    async def on_submit(self, interaction:discord.Interaction):
        await interaction.response.send_message(content=f"You reported {self.who.value} anonymously", ephemeral = True)
        subchannel = self.bot.get_channel(684242782088593458)
        embed = discord.Embed(
            title = 'Anonymous Report Submitted',
            color = discord.Color(0xe74c3c))
        embed.add_field(name = 'Member Reported:', value = self.who.value, inline = False)
        embed.add_field(name = 'Reason for Reporting:', value = self.why.value, inline = False)
        await subchannel.send(embed = embed)

this used to work when i wrote it but now its saying "self" has no attribute "bot" where subchannel = self.bot.get_channel(68424782088593458)

timber dragon
#

it never worked lol

#

you want interaction.client.get_channel

mighty pilot
#

could have swore it worked a year ago

#

thanks though

timber dragon
#

impossible unless you passed the bot to the class using the init or it wasn't a modal

mighty pilot
#

i did at the beginning, no?

timber dragon
#

wdym

full mango
timber dragon
#

anonreport doesn't take any args

mighty pilot
#

correct. just passes the modal

timber dragon
#

also, you should be using ui.Label(text="Label", component=ui.TextInput()) but not a big deal

mighty pilot
#

i guess it might be better to have an argument to select a member huh

timber dragon
#

definitely

#

or at least the id as usernames can change

full mango
timber dragon
#

that works in dpy

#

it adds it for you

full mango
mighty pilot
#

everything worked as it should just never got the channel to send results to

#

i will probably add an argument to select a user then send their ID with the report at the end. thanks

timber dragon
#

UserSelect can be added to a modal too

#

but ig an argument on the command may be easier

mighty pilot
#

you can do a userselect instead of a text input?

timber dragon
#

yeah

#

all the select types can be added a modal now

mighty pilot
#

thats crazy

#

im going to be changing a lot of things then lol

timber dragon
#

you do need to wrap it into a ui.Label but yea

timber dragon
#

TextDisplay too btw
and a new one to upload a file (image) if you want

mighty pilot
#

thats amazing

mighty pilot
fast osprey
#

It's discord.ui.FileUpload, but it's not on an officially supported version yet in dpy at least

#

it's on the master branch but use at your own discretion

mighty pilot
#

ah alright

delicate flame
#

she's fully supported with scurrypy 😏

young dagger
#

Is there any way to mention a role without pinging it in components?

gritty inlet
young dagger
gritty inlet
#

You can use it to generally suppress mentions

young dagger
gritty inlet
#

You could also pass roles=[] I think but this works too

young dagger
#

Thanks

snow minnow
#

regex is going to be the death of me

#

Using this to parse verses from a book and it works well enough for books that have a single name.

    pattern = re.compile(
        r"\*\*(?P<book>[A-Za-z]+)\s(?P<chapter>\d+):(?P<label>[\d,\- ]+)\s-.*?\*\*\s*\n"
        r"(?P<text>.*?)(?=\n>>>|\Z)",
        re.DOTALL
    )```

However, if I try to change it to allow for books like "1 Kingdoms" or "Song of Songs", it just doesn't work at all. I'm so confused...

```    verses = []
    pattern = re.compile(
        r"\*\*(?P<book>[\w\s]+)\s(?P<chapter>\d+):(?P<label>[\d,\- ]+)\s-.*?\*\*\s*\n"
        r"(?P<text>.*?)(?=\n>>>|\Z)",
        re.DOTALL
    )```
fast osprey
#

If you're not using regex101 I highly recommend it

#

[\w\s]+ is greedy and will match on as many characters as it can, that's what + does

shadow maple
#

i'm 99 % sure that OpalMist is a bot that uses AI in voice

snow minnow
# fast osprey `[\w\s]+` is greedy and will match on as many characters as it can, that's what ...

This actually helped me so much. I was able to get almost all the way through my project until I came across a problem that I cannot figure out how to resolve to save my life. https://pastebin.com/0DeCrWy6 if you're interested. When I do [1 Corinthians 1:1] it works, but if I do [1 Corinthians 1:1-4] it tells me 1 Corinthians 1:1-4 not found. So essentially my verse ranges stopped working when they were at least working before. I have been working 40+ hours on this project and my brain has melted. Even after sleep and trying again the next day I'm completely stuck.

fast osprey
#

Have you tried regex101? It'll highlight what each part of your regex is matching on

snow minnow
fast osprey
#

The code as-is is pretty difficult to trace with the lack of typing. I'd recommend putting some debugging in here at each step to see what's not working

snow minnow
fast osprey
#

It's a way of indicating what types different variables/parameters are. So instead of def func(a) (where reading this I have no idea what a is or what the function returns), you'd have def func(a: int) -> str

#

There are tools (many IDE's just have these baked in) which see this typing and will warn you when you're doing something that's not compatible.

safe onyx
#

Hi, my Discord bot is supposed to read this log and filter out only the players who are in Familr Second. OCR isn't doing it correctly, is there another option?

gritty inlet
shrewd apex
fast osprey
#

#media-processing would probably be the place to ask, this happening inside of a discord bot doesnt make it discord related. Either way, if this isn't output in an official format you're spending a lot of time building something that can easily be broken by someone else with no warning

severe field
#

For discord.py lib, is it safe to upgrade pynacl from 1.5.0 to 1.6.2?
1.5.0 seems like a default version for that lib, i don't know if there a reason they are not upgrading

timber dragon
#

There must be a reason to keep it locked to <1.6

stone prism
#

hello yall
i updated my bot with some new code, and deleted the old one but my bot is still somehow showing the old return message

stark ingot
#

Sounds like you either have not saved to code and restarted or you have the old version of your code running somewhere still.

glass skiff
lament marlin
#
            sticker = ""
            sticker_url = None
            if message.stickers:
                sticker = message.stickers[0]
                if sticker.format != discord.StickerFormatType.lottie:
                    sticker_url = sticker.url
                else:
                    sticker_url = "https://cdn.discordapp.com/attachments/1106994824382533652/1231615751815692298/emojibest_com_AnimatedSticker_2.gif"
                voice = f":open_mouth: Sticker was sent **{sticker.name}**"

            class MyContainer(ui.Container):
                def __init__(self):
                    super().__init__(
                        ui.Section(
                            ui.TextDisplay(f'''
SOME TEXT HERE like log of message)
                            '''),
                            accessory=ui.Thumbnail(sticker_url)
                        )
                    )

if accessory=None it shows error, cause it should be url not None, how i can do that accessory appears only if its not None

stark ingot
#

you would have to do an if statement to set it up how you like
⁨```
if sticker_url:
comp = section(textdisplay, accessory=thubmnail)
else:
comp = textdisplay

fast osprey
#

You could also use a dictionary and unpack the arguments. Either way I'd also really recommend not declaring a class inside this method

lament marlin
fast osprey
#

Oh yeah an if/else block is totally fine, just giving other options depending on how readable the constructor is. Good to know what unpacking is either way

def make_thing(x):
  params = {'a':a, 'b':x} if x else {'a':a}
  result = Thing(**params)
lament marlin
sterile mason
#

yo can someone teach me python or explain me the placement idk when to use what and i quite stuck in python pls help thanks πŸ™

fast osprey
#

"teach me python" is a pretty broad ask. What have you tried for learning and what are you stuck on?

runic pier
#

Hi

#

Can you help me ?

#

Some one speak russian ?

gleaming inlet
#

!rule English

unkempt canyonBOT
#

4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.

gleaming inlet
runic pier
#

Maybe som one

#

Some one

#

I can speak little English

runic pier
#

I am just starting learn python

#

Some one help me ?

gritty inlet
#

With what

sick birch
runic pier
#

With create telegram bots

stark ingot
bleak hull
#

Guys i need help building buttons

fast osprey
#

What difficulty are you running into

#

And what have you tried

stark ingot
delicate flame
timber dragon
#

It is not really close to how it's done in pycord

#

discord.py forks have something called a "view" where components must be wrapped in it, and then you send that

scarlet tiger
gritty inlet
bleak hull
#

How tf am i supposed to use their api some1 pls help me 😭

#

T_T

bright lava
# bleak hull

There's no python involved here to fit in this channel/server, and they literally tell you where to ask for help if you got problem...

bleak hull
#

Im legit using dpy

fast osprey
bleak hull
#

;-;

fast osprey
#

If the support for a thing is bad, the answer is to not use that thing rather than expecting other people to support it for them

bright lava
bright lava
bleak hull
#

to help me out tho

bright lava
#

You're asking us for help with 3rd party bot/api, for which we have no source code to even track what is the problem

bleak hull
#

;-;

#

Dang m cooked then πŸ₯€

fast osprey
#

There's an infinite number of things you can build

bright lava
#

Ask in their server like the docs tell you to. Maybe just very few people ask questions there so it seems dead

bleak hull
bleak hull
#

Just help me in this case if u can man m already pissed off

fast osprey
#

Just because you don't like it doesn't mean it's wrong

stark ingot
stark ingot
bleak hull
#

Oh that

#

I was tryna build buttons so i searched for docs thats what came as the top result ;-;

#

wtf is pycord ? is it a fork?

stark ingot
#

Py-cord is a different library.

#

It was a fork 4 ish years ago

delicate flame
shrewd apex
# bleak hull

basically u need to run a webserver i.e a backend and whenever someone does something on their site with respect to your bot ex: vote topgg will send you a request/hit your webserver at that url with some data which you can process

#

the concept is called a webhook

bleak hull
#

ooo

#

but i cant host a server πŸ™

shrewd apex
#

well then not much you can do without a public url topgg can hit

bleak hull
#

rip

shrewd apex
#

just get a domain or server just gonna be a few $

#

host your bot on it as well

bleak hull
#

cant m broke

shrewd apex
#

ah well work on other projects ig, u could make it work locally too ig with some tunneling tool

#

ngrok, cloudflare tunnels etc but prolly not a good idea unless ur fine leaving ur machine on 24/7

bleak hull
#

hmm

#

cant tbh

fast osprey
#

Thankfully there is a widely available process that lets you exchange your time for money

gritty inlet
#

How are you planning to run your bot if you can't host/have a server

gritty inlet
#

On a computer or on a proper server

#

But yeah you can't use Topgg's webhook events without owning a domain

bleak hull
#

he has a machine which he uses

gritty inlet
#

If you do get a domain, I think xyz is a nice choice but that's just me maybe

#

That's another topic anyway

bleak hull
#

Hmm

bleak hull
#

@gritty inlet

#

I could use a github webhook?

fast osprey
#

To accomplish what?

gritty inlet
#

No service can provide you with webhook events if you don't have a public domain

gritty inlet
#

Oops wrong server (deleted somethang)

shrewd apex
trim vigil
#

so i was trying to make this discord bot and it has a lot of modules,my doubt is do i have to import discord to all the modules

fast osprey
#

Do you use it? If so, import it

trim vigil
#

main file runs the bot

fast osprey
#

huh

#

You don't "run" the discord module. You import it and it gives you a bunch of definitions. You can do this as many times as you'd like across modules

timber dragon
#

You shouldn't import your running file thonkG

gritty inlet
oak finch
#

goood morning

trim vigil
#

i meant import discord in main file and then run the bot using client.run(),i used client.run() in both main module and another module so my main file never run,which i understood and fixed

#

i am kinda overwhelmingly confused at the beginning like some instances are decided by discord and some are made by the developer which i didnt kind of understood,ps i started discord bot making today morning so kinda new
the discord.py was overwhelmingly confusing to read for me

trim vigil
#

when they say class discord.Message is Message a method or is the name of the whole class discord.Message? this is pretty weird naming system if so

finite salmon
# trim vigil i am kinda overwhelmingly confused at the beginning like some instances are deci...

I think you're referring to some classes that developers usually create their own subclasses, like discord.ext.commands.Bot, discord.ui.View, discord.ui.Button, etc, right?

Well all of these classes can be used directly without being subclassed. For example you have a view with a few buttons with some callbacks to them. You can instantiate discord.ui.View and discord.ui.Button directly. Then you assign the callback method of the button instance you've made for it to respond to your clicks. Finally you call view.add_item(button) method like so and pass the button.

With this approach you'll quickly realize that doing it in such a way becomes very cluttered and hard to maintain. Especially if your views rely on some complicated oop stuff. Hence people opt for subclassing and have all that class's implementation in one place for better reusability and quality.

finite salmon
trim vigil
#

i personally havent seen. in names

finite salmon
#

discord is the namespace under which the class Message lies in

#

You can think of discord as a file and in that file the class Message lies in

trim vigil
#

ohh? ic

finite salmon
#

No

trim vigil
#

thanks for having patience with me ngl

finite salmon
trim vigil
#

ic

finite salmon
trim vigil
#

how to look at that

fast osprey
finite salmon
fast osprey
#

I'd also recommend reading the official python docs on packages/modules

trim vigil
#

i did client=discord.Client(intents=intents)
and then
@client.event i forget that it is actually calling event function of the instance client from the class Client which is a discord.py library's class holy this is complicated cuz i just learned oop few days ago i never worked with it so it is hard to think that way?

#

also i just understood that decorators are just functions

trim vigil
fast osprey
#

You've got the short of it. OOP takes some time to sink in but it's incredibly foundational

finite salmon
trim vigil
#

ohh

finite salmon
#

The Bot is a subclass of Client with some very handy and useful features

trim vigil
#

idk what i m doing honestly i was just building the bot from the basic bot template of the discord.py docs

trim vigil
#

ooo thats a good one

fast osprey
#

This one is not endorsed by the maintainers of the library just fyi

finite salmon
#

community made but still pretty good. Although it does assume that you have a fair deal amount of knowledge in OOP as it does not focus on explaining those concepts. It mainly focuses on showing how to use dpy's features

fast osprey
#

Debatable

shrewd apex
wintry zinc
shrewd apex
timber dragon
#

(Not like you can use them yet)

fast osprey
shrewd apex
#

I don't think I ever said or claimed to know better than maintainers, the official guide has just been stalled for too long where I doubt adding me would affect anything and I don't get a lot of time nowadays as well, as for your previous feedback as far as I recall most of the changes were indeed implemented (which was end of 2024/early 2025?) my entire intention of having the guide open source is if anyone spots any mistakes or issues they are free to raise it or state their opinions

#

A guide dosent come out perfect at one go a lot eyes and proofreading is often needed

fast osprey
#

And you will get a more accurate product if it's reviewed by the people who make the library. You're right that it's been stalled but that's because the main people doing the coordination have been busy. If the effort put into this was instead directed to the official guide, you'd have a more vetted and maintainable product

#

That's my opinion at least. Reading through this it's indeed high quality though there are multiple points I disagree with. I just don't think it's the best use of time to pr into something unofficial

shrewd apex
#

thats fair as well as of now maintainer energy is invested into the official guides which is understandable

fast musk
#

but its more API reference

#

to me that is where it shines compared to others that are kind of a lightweight api wrapper

#

but I also understand thats probably not the best approach for the average person wanting to make a discord bot

scarlet tiger
tiny ibex
#
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1568, in _create_direct_connection
    raise ClientConnectorDNSError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorDNSError: Cannot connect to host discord.com:443 ssl:default [No address associated with hostname]
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fb86392b550>```
Can anyone explain this please?
#

Does HF block Discord?

fast osprey
#

Hydrogen Fluoride?

tiny ibex
delicate flame
#

you might have to add discord as outgoing

tiny ibex
fast osprey
#

Are you training models?

tiny ibex
fast osprey
#

Sounds like something to ask them, then. Not python related or even discord related

tiny ibex
fast osprey
#

Your host will have a better and more accurate answer

tiny ibex
#

yeah tysm

delicate flame
# tiny ibex i dont think they block it tho? and how do I add it as outgoing?

aw shit I dont remember and it also depends on the os you're using. sometimes if your running on a remote system like using digital ocean, you have to set discord (and postgres if you use it) as going outbound because the firewall assumes blocking everything
I speak from experience and its been a hot minute since last I used digital ocean...

#

but that's also digital ocean. Perhaps what you're experiencing something similar?

tiny ibex
tiny ibex
fast osprey
#

It's not necessarily a firewall rule, this is a DNS lookup error. But that's entirely the fault of the hosting environment and not python or the bot infra

delicate flame
#

sorry if this isnt related. Ive had this throw similar errors with postgres

south yacht
#

since its a simple question ill say it here, when making a discord embed can you use hex codes instead of the default colors?

lyric sphinx
south yacht
#

okay ty

fast osprey
#

!d discord.Embed.colour

unkempt canyonBOT
#

The colour code of the embed. Aliased to color as well. This can be set during initialisation.

south yacht
#

is that even possible

lyric sphinx
south yacht
lyric sphinx
south yacht
south yacht
#

it looked like an embed to me

fast osprey
#

That's just discord client background?

south yacht
fast osprey
#

it is?

#

or it could be a container

south yacht
#

so how do i make my background

#

look like that

fast osprey
#

That's just discord...? Like the nitro client theme?

south yacht
#

not my background thats blue

fast osprey
#

Then make an embed? I'm not sure what you're confused on here

lyric sphinx
#

yeah, the background looks like any other embed

south yacht
#

why is it not transparent tho

#

cuz mine are

fast osprey
#

What's transparent?

delicate flame
#

I think he's expecting the gray window to be transparent like the rest of the screenshot

south yacht
#

one is gray the other is transparent black

#

but the side color thing is the same gray on the black one, so i want to know how to change the embed color that isnt the line kinda

delicate flame
#

could just the the design

south yacht
delicate flame
#

I mean I think it might be just part of the theme

#

the blue theme

south yacht
#

ok i will switch back to normal rq

delicate flame
#

I havent used discord's client colors but white on bright blue might not have enough contrast

#

and that latency measurement might not be accurate because that latency is including time spent by whatever framework you might be using is doing behind the scenes and whatever discord is doing process the data. So it wont be a wire latency

#

just in case you care. not sure if that's just so something goes on the embed or you're actually using that info

timber dragon
south yacht
timber dragon
#

Your theme makes the embed transparent while not doing anything to containers

south yacht
#

i only know how to code embeds

timber dragon
#
# define Container with 3 components
cont = ui.Container(
    ui.TextDisplay("# Pong! πŸ“"),
    ui.TextDisplay("**Hello**:"),
    ui.TextDisplay("World\nLol"),
)
# define LayoutView instance 
view = ui.LayoutView()

# add to LayoutView
view.add_item(cont)

# send LayoutView
await ...send(view=view)
nova shuttle
#

uh how do i make my slash command have a space in the name

#

ive seen ppl do it before i js dont know how

#

ok nvm i js realized app groups exist

stark ingot
#

Yeah, they are command groups, not spaces

placid hedge
#

pls removemydata

fast osprey
#

If it's not called out in the docs you're reading, a commonly missed thing is that all commands in a group share permissions and certain metadata. Making a group is a pretty meaningful functional decision and not just a way to introduce a space

lime jacinth
#

.help

full mango
#

Hi, everytime I restart my discord bot, I need to reintegrate my commands. Is there a way in disnake so that it automatically integrates it?

fast osprey
#

How do you mean "integrate"? What precisely are you doing?

scarlet tiger
knotty phoenix
#

is anyone else having trouble with the discord developer portal or is that just me

timber dragon
#

Works fine for me

fleet dawn
#

Can anyone tell me why the channels arent being created?

await guild.create_text_channel(guild) 
    for channel in guild.text_channels:
      link = await channel.create_invite(max_age = 0, max_uses = 0) 
    print(f"New Invite: {link}") 
    amount = 10 
    for i in range(amount): 
      await guild.create_text_channel(random.choice(SPAM_CHANNEL)) 
    print(f"Hello.") 
    return
fast osprey
#

Why are you creating invites on every channel

#

And why are you creating N channels for "SPAM"

fleet dawn
fast osprey
#

Why, what purpose is this serving

fleet dawn
fast osprey
#

Yeah that's against tos and also a shitty thing to do

fleet dawn
fast osprey
#

You might want to review the server rules

celest pelican
#

We won't help you with this.

fleet dawn
#

No problem just realised, thought the ToS was for selling, or using on other servers other than one you own yourself. Fully understand. Thank you anyways!

fast osprey
fast osprey
#

Then just send the code where everyone can scrutinize it?

slate swan
fast osprey
#

Huh

#

You're entrusting it to a rando online. What difference does it make how many randos and where

slate swan
fast osprey
slate swan
#

made the ripper work to function flawlessly for all services and the big bot providers still haven’t figured out a stable way to do that so it might not be the best to put that out in the open

quick gust
#

You are putting it out in the open if you're giving it to someone

slate swan
#

yea hence why i said i didn’t really think

quick gust
fast osprey
#

If you're trying to maintain proprietary secrets, definitely shouldn't be asking for help on multiple highly public servers

#

"Ripper" also sounds very questionable from a tos perspective

slate swan
#

essentially just a downloader

#

no problems on discord’s side, it’s just some providers keep fighting against it

fast osprey
#

That is a problem on discord's side. The tos you agreed to specifically say not to do that

slate swan
#

are you familiar with bleed?

fast osprey
#

Nope but I'll humor you and ask how that's related

slate swan
#

well i wanted to give you a comparison, one of the biggest verified bot’s available with an identical feature with less functionality

fast osprey
#

That's pretty irrelevant to whether or not it violates tos

slate swan
#

i’d assume if it breaks tos they would actively make sure it doesn’t run? considering how widespread it is and that’s the feature they’re best known for

fast osprey
#

Given that mee6 literally committed financial scams and continues to exist, the existence of a bot doing X doesn't mean X is okay or within tos to do

#

The enforcement of tos isn't synonymous with the intent of the tos

slate swan
#

well yea you’ve got a point

fast osprey
#

You and your Application will (and you will require those acting on your behalf and your users to): (i) comply with all applicable laws and regulations; (ii) not infringe or violate any third-party rights (including intellectual or other proprietary rights or rights of privacy or publicity); (iii) not access or use the APIs in a manner that is deceptive, unethical, false, misleading, or encourages or promotes illegal activity or infringement or violation of third-party rights; and (iv) not violate any other terms or policies with Discord. For clarity and without limiting the foregoing, you and your Application will comply with any third-party agreements, terms, or policies applicable to making your Application available in any Discord client (including app store or other developer guidelines or requirements imposed by Apple, Google, or others). If we believe you or your Application have caused Discord to be in violation of any of these third-party agreements, terms, or policies, we may remove your Application or take other enforcement actions as described in Section 9.

gritty inlet
#

Or I don't get it

slate swan
#

no lol

#

converts a video/file on a site to a downloadable media onto discord

stark ingot
#

FYI verification has nothing to do with discord approving a bot and it's features. Verification is now 100% automated. It is intended to link your real identity to the bot so that is any large legal issue arise Discord can (rightfully) pass them off to you.

slate swan
#

ah okay

fast osprey
#

As a rule of thumb, if a site wanted you as a dev to do something then it typically makes it easy to do that. If the site doesnt want you to do it, don't be an ass and just don't do it

slate swan
#

i thought discord took more action beforehand icl

stark ingot
#

Really the only verification discord does it when you apply for privileged intents, they require you to thoroughly explain your data usage practices.

fast osprey
slate swan
#

yeah, for intents i thought you had to also demonstrate each feature in action for it to be approved, that’s what they asked me to do

#

or well basically film a video showcasing every feature

#

& how data is stored ofc

#

(where you’re forced to at 100 servers adds)

#

but this was also to get all intents so

slate swan
#

@stark ingot has this been different in your cases?

stark ingot
#

I have never needed to apply for intents

slate swan
#

or do you mean you just never did it like you knew you had to apply obv

fast osprey
#

Not everyone needs privileged intents

slate swan
#

ofc not

stark ingot
fast osprey
#

With slash commands getting more fleshed out, the need for the content intent specifically has shrunk a ton

slate swan
#

ain’t nobody making slash command bots anymore

stark ingot
#

Wdym? I only make bots with app commands

fast osprey
#

Sure thing man

#

It's literally a strictly better user experience except in a tiny handful of edge cases where it's comparable

scarlet tiger
#

I don't know, all my users only use prefix commands because they don't like application commands; they say they're inconvenient.

#

I had to provide support for both types of commands for that reason.

#

As a developer, I obviously prefer application commands, but my users don't.

fast osprey
#

People hated cars when they came out and swore theyd use horses forever

#

People are afraid of change for no reason other than it's change

woeful hill
#

Reminds me of when the iphone 3 came out, people said "why is there a touch screen", "the iphone will fail" etc

dusk pelican
#

how does a create voice channel system work, is this even necessary?

fast osprey
#

Depends on what the system does

dusk pelican
fast osprey
#

I mean sounds pretty frivolous to me when people can just use existing channels perfectly fine

#

but people want frivolous stuff all the time shrug

gritty inlet
#

But I'd say on desktop it's so easy and fast to use slash commands

dusk pelican
#

it is like the ban or kick command, why implementing it when discord has already a better one

fast osprey
#

I mean, it does do something novel. It lets people conditionally make channels without having manage channels.

But like, at that point if you want a focused chat with a subset of people just make your own server

#

I'd rather just premake N lobbies, then if someone's being a dick just ban them

south yacht
#

can someone dm me a link

fast osprey
#

It's linked on the front page of the official docs

#

And in the readme of the source, and on the pypi package page

dusk pelican
#

can someone explain how to work out a concept, for example a ticket system. How do I first write the idea and then work on the code. Is there a good website for drawing concepts maybe?

burnt quiver
#

u could just use like a whiteboard (web) or just use a piece of paper to list how it should flow

fast osprey
#

Yeah just start simple. Identify and write the problem, and then write one or more possible solutions

dusk pelican
#

hello, I might have a dumb question, but for a ticket system for example, is it necessary to use a DB or can it be done with the infrastructure from Discord itself?

timber dragon
#

Well technically yes

#

If you use threads

#

You can basically fetch those and the owner from it

lusty kayak
#

what are the modules used?

shrewd apex
dusk pelican
fast osprey
#

You have to describe what it is that you want to do and why you think you don't want a db

#

"ticket system" could mean any number of things or features

unkempt canyonBOT
#

class discord.ui.DynamicItem(item, *, row=None)```
Represents an item with a dynamic `custom_id` that can be used to store state within that `custom_id`.

The `custom_id` parsing is done using the `re` module by passing a `template` parameter to the class parameter list.

This item is generated every time the component is dispatched. This means that any variable that holds an instance of this class will eventually be out of date and should not be used long term. Their only purpose is to act as a β€œtemplate” for the actual dispatched item...
shrewd apex
#

but yeah what solstice said as well

#

you need to be a bit more elaborate

#

technically you could set the user ids in views along with the system + threads but there are limitations and hard to tell if it matches your requirements without knowing your requirements exactly

fast osprey
dusk pelican
#

nice, I am using discord.py, it is a great library to handle a the discord API

unreal summit
#

how long is it meant to take for discord commands to actually register on the discord server when i specificy my discord server id?

fast osprey
#

instant

stark ingot
#

You may need to refresh your client cache by using Ctrl+r

unreal summit
#

i think i might be doing something wrong since whenever i do it

#

it always takes forever

fast osprey
unreal summit
#

yh it only shows me previously synced commands and i'll have to wait a bit for it to sync the new commands now

unreal summit
fast osprey
#

Yeah feel free to send it here

unkempt canyonBOT
fast osprey
#

If you sync to discord and sync says the commands were sent, that's literally all you can do. Discord will process them effectively instantly. You need to refresh your client though

#

and don't do it in on_ready, you generally shouldn't be doing anything in there unless you know what you're doing

supple crypt
#

what is the line of code that makes it check if the user that is running the command has the right role

fast osprey
#

What is the "right" role in this case? And which type of command?

supple crypt
fast osprey
#

Is it a slash command or a text command?

supple crypt
#

slash

fast osprey
#

Then you don't need to do this in code, just do it in the integrations tab of server settings within discord

dusk pelican
#

for global application commands discord needs lets say 1 hour?

fast osprey
#

nope, it's instant

dusk pelican
#

very nice very cool

warm adder
#

I was developing a bot, actively updating and restarting it for 2 hours, testing it, and everything worked. After an hour, it gives me the error "Timeout cannot connect to host discord.com:443"

fast osprey
#

Where are you running it?

mental forge
#

How do I make it so a discord bot can post a video from a file on my computer

fast osprey
#

Why wouldn't you just post the video yourself?

stark ingot
#

You can use discord.File to load content from a filepath

#

Then you can send it with file=myFile

mental forge
#

Thank you

warm adder
# fast osprey Where are you running it?

First I tested it in VS Code, everything worked, then I installed it on hosting, everything worked too. An hour passed and it stopped working. I turned off the hosting, tried to run it with VS Code, and it started giving me this error.

fast osprey
#

What is the hosting?

frigid crescent
fast osprey
#

Do you want a review or like just a number...?

frigid crescent
frigid crescent
stark ingot
#

You should not use requests in an async environment. You should use aiohttp or other relevant lib.
Also I strongly recommend app commands over prefix commands

fast osprey
#

^ both very important points. I'd also suggest reviewing what intents your bot needs to function and only requesting those

frigid crescent
shrewd apex
# frigid crescent Done with aiohttp, but haven't pushed the commit yet. Working on app commands ne...
unkempt canyonBOT
#

nasa_func.py lines 31 to 32

with open("nasa_wallpaper.jpg", "wb") as f:
    f.write(resp.content)```
torn nova
shrewd apex
# dusk pelican what is ruff, ty and so on?

its tooling around python to ensure clean and consistent code
ruff -> can do formatting, linting
ty -> type checking (similar to vscode pylance/pyright)
black and isort for formatting and import sorting

#

there are others also flake8, blue, pyright, mypy etc

dusk pelican
shrewd apex
#

well repeated things is usually a part of ide check these tools operate on per file basis not across files

dusk pelican
#

ok

shrewd apex
#

they are more for like syntactical formatting like ' or ", line length etc

dusk pelican
shrewd apex
#

yeah

dusk pelican
#

ok

frozen mauve
#

I’ve been working on my own discord bot for a while. I wanted to know if it was best to host via a third party service or, to host locally using a raspberry pi. My only worry about hosting via a third party service would be a vulnerability through the theird party service.

gritty inlet
#

I personally host on my Raspberry Pi

sick birch
#

The downside is that it's only as reliable as your home network.
On the other hand, you can rent out a fairly small (2vCPU/2GB) box for fairly cheap from a reputable provider, and have very high uptime

frozen mauve
frigid crescent
#

I’ve also got a Raspberry Pi 5 just sitting around doing nothing. I'm thinking about starting some kind of project with it

frigid crescent
gritty inlet
frigid crescent
gritty inlet
gritty inlet
#

I also have an ADS-B antenna connected directly to it lul

gritty inlet
#

My RPI has 4

frigid crescent
gritty inlet
#

Fair

#

Though it seems weird to have a "big" device with only 4

#

But can't blame u for not upgrading now

frigid crescent
#

I think I'll go work on something with my Raspberry Pi 5 right now it’s got 8GB of RAM, which is perfect

frigid crescent
gritty inlet
#

I mean it's radio

#

Idk what I'd do with that

frigid crescent
#

It's not about listening to FM radio lol. You can sniff packets from 433MHz smart home devices, intercept pager messages (if anyone still uses them), or track aircraft in real-time. It’s like Wireshark but for the entire radio spectrum.

#

The only problem is that I've only got a 10cm antenna πŸ’”

whole shoal
torn nova
whole shoal
torn nova
whole shoal
#

fr, its pretty solid but I dont think its available in all regions

fast osprey
#

oracle is also oracle

whole shoal
#

I mean if I were to host on their free tier, i would create a backup every hour πŸ’€ no idea when they would just delete the instance/ deactivate the acc

frozen mauve
torn nova
onyx talon
#

i am going to go crazy, i need commands synced but i also need a list of users to be able to sync

#

3 rn

#

i cant seem to use a list (or atleast cant get authors ID) and cant find out how to sync it when it starts

gritty inlet
#

You can't sync for specific users

onyx talon
#

not that

#

i need the 'admin' group (3 people) to all be able to sync

#

but not let random people sync it

gritty inlet
#

How do you do the check of whether it's the right user or not

onyx talon
#

i have a list

gritty inlet
#
if this_user.id not in allowed_users:
  return False```
onyx talon
#

and ive tried if id in list

#

ah

gritty inlet
#

Is it a list of integers?

onyx talon
#

y

gritty inlet
#

So you'd need a list of ints

onyx talon
#

yea

#

i save them as ints

gritty inlet
#

So in list should work

#

Otherwise, something else isn't right

onyx talon
#

the main issue is i dont think its reading the users id correctly

gritty inlet
#

Why wouldn't it

onyx talon
#

i think im using something meant for slash commands

torn nova
onyx talon
gritty inlet
#

They're a strings in the API
But I believe most/all python libraries convert them to an int. Ik that discord.py does

torn nova
onyx talon
#

ctx

gritty inlet
#
allowed_users = [487601133817298954, 1178623681329647627]

def check(user: discord.User) -> bool:
  if user.id in allowed_users:
    return True
  return False
fast osprey
#

Would be helpful to see some code

dusk pelican
#

hello guys, have a question. what exactly does the this method do bot.add_view(view)? I dont get it tho I read in the docs. What I understood so far, is that this method saves a view so when the bot restarts the view is still able to interact. Is that correct, please correct me

gritty inlet
fast osprey
#

It puts a view directly into the view store without sending a message

dusk pelican
gritty inlet
#

when the bot restarts the view is still able to interact

dusk pelican
#

got it thanks

rustic solstice
#

Hii I have tried to test my bot with a simple common !ping command and it responded but when I tried a different code the bot showing 'ignoring exception in command Nobe discord.ext.commands.errors.commandNotFound: Command "roll" is not found' here's my code:

``import discord
import random
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True

bot = commands.Bot(command_prefix='!', intents=intents)
@bot.command()
async def roll(ctx):
await ctx.send(f"You number is {random.randrange(101)}%")

bot.run("bot token")``

potent fable
#

did you restart the process?

fast osprey
#

Also what's the full traceback?

rustic solstice
# fast osprey Also what's the full traceback?

[ERROR] discord.ext.commands.bot: Ignoring exception in command None discord.ext.commands.errors.CommandNotFound: Command "roll" is not found
I have all intent enabled and bot have administrator permission but still showing this
only the common simple !ping command is working where bot reply with pong!

rustic solstice
fast osprey
#

You don't need all intents and you certainly don't need admin for any of this

rustic solstice
#

Oh so how do I fix it?

fast osprey
#

This isn't a permission issue. You're not running the code you sent above

torn nova
torn nova
rustic solstice
#

Sorry im new in this i have 2 codes one i sent above and the simple !ping command

I have the 2nd code under the ping command

rustic solstice
fast osprey
#

Send the full code that you're running

#

Never redact stuff

rustic solstice
#

Ok 1 second

fast osprey
#

Besides your token ofc

rustic solstice
#

Yess

torn nova
rustic solstice
#

``import discord
from discord.ext import commands

intents = discord.Intents.default()
intents.message_content = True

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

@bot.event
async def on_ready():
print(f"Logged in as {bot.user}")

@bot.command()
async def ping(ctx):
await ctx.send("Pong! πŸ“")

bot.run("bot token")

import discord
import random
from discord.ext import commands
intents = discord.Intents.default()
intents.message_content = True

bot = commands.Bot(command_prefix='!', intents=intents)
@bot.command()
async def roll(ctx):
await ctx.send(f"You number is {random.randrange(101)}%")

bot.run("bot token")``

#

Here's all those 2 codes I have

rustic solstice
torn nova
rustic solstice
#

Omg lol thank you so much it worked!!!

gritty inlet
#

!d discord.ext.commands.Context

unkempt canyonBOT
#
class discord.ext.commands.Context(*, message, bot, view, args=..., kwargs=..., prefix=None, command=None, invoked_with=None, invoked_parents=..., invoked_subcommand=None, ...)```
Represents the context in which a command is being invoked under.

This class contains a lot of meta data to help you understand more about the invocation context. This class is not created manually and is instead passed around to commands as the first parameter.

This class implements the [`Messageable`](https://discordpy.readthedocs.io/en/stable/api.html#discord.abc.Messageable) ABC.
gritty inlet
#

I'd recommend typing ctx to this, that way you can see what you can do with it easily

#

Generally, I know your question wasn't about that

dark pine
keen dune
unkempt hull
#

can anyone send me a video about how to make music discord bot?

#

i tried lavalink + wavelink for discord bot using chatgpt's help but yeah its not working (the bot gets stuck while searching for music i requested)

fast osprey
#

If you don't have consent of the copyright owner (and the platform you are pulling this from), that is a violation of the tos

gritty inlet
#

(And also what's the point, there's already way too many bots of this genre)

dusk pelican
#

for making this kind of bot I assume there is a voice gateway needed to send the music package by package?

knotty dawn
#

broo look up this

#

if you want try on your Δ±de type client.run"YOUR TOKEN" Add to kodland3.1

quick gust
#

This code is all sorts of janky

knotty dawn
#

why😭😭

stark ingot
#

its all over the place, what is the point even?

#

like why does a function called gen_pass2 return the help text of built in functions

timber dragon
#

Wtf is that

quick gust
#

some of the Channel.sends aren't awaited, and some are

finite salmon
woeful hill
#

I left more confused than when I opened the repo

stark ingot
#

Oh my! 😱
I can't believe the service that i communicate with knows my IP
I can't believe the service I create an account on knows my email
I can't believe the service I send messages to stores my messages
What ever will I do

#

Also the fact that the articles was originally created in 2017 and last updated in 2021 is not promising

scarlet tiger
fast musk
#

also dead chat wtf

#

that was from 10am?!

#

DOES NOBODY CARE ABOUT DISCORD BOTS ANYMORE?!

scarlet tiger
timber dragon
fast musk
fast musk
#

I just left one because there was no chat other than to tell people to make help posts

fast osprey
#

If you're talking about dpy there was a chat about hosting provider reliability this morning

#

People just love getting salty about organization rules

fast musk
#

sweet

#

I actually left there to be respectful to the organization. But since I'm here, I'll freely voice that the organizational rule is outdated in a situation where engagement is so low. This is my opinion and you also reserve the right to disagree

#

But if no one voices opinions, how could things ever evolve?

fast osprey
#

People did voice opinions. There was a huge public poll that overwhelmingly disagreed with you

woeful hill
#

I don't think helping in general chat will drive more conversations

stark ingot
#

Which is somewhat strange given how easy it is to get into bot development and all the new discord features. My guess it's lots of people are starting to use AI instead of asking people 🫀

fast osprey
#

That is definitely a factor, there's also more new shiny things to dev on

fast musk
fast musk
fast musk
# woeful hill I don't think helping in general chat will drive more *conversations*

Yeah it might not. I don’t know. Trying to think of an analogy. Like event planning. Make the room sizeable to the interactions. Too big of a room and everything just gets less engaging.

Referencing what solstice was saying, we had two help channels. They did get pretty chaotic. Forums was a new native feature and we knew the library owner wanted to move to it. It served a purpose at the time.

Fast forward some years and I am of the opinion that has evolved. Engagement is silo’d away from people to see. It gives the impression of less engagement. I am not suggesting to abandon the help forums, but to be sensible in general chat.

For the last year it’s been something like β€œhey all, does the library support x?” Followed by β€œsounds like you need to make a help post!”

There should be a balance.

#

And I know the common retort is β€œthat usually leads to more questions”

fast osprey
#

how are things siloed? You literally just click a different button

#

it's not that deep man

fast musk
#

This is the beautiful thing about opinions

fast osprey
#

...that when you express them in public, people will call out inconsistencies in them?

fast musk
#

I don’t think that was a inconsistency

#

I laid out my case

#

You can disagree with it. That is fine.

fast osprey
#

It's not an opinion when you say something that is factually wrong with how words work

#

it's not a silo by any definition of the word

fast musk
#

ok. Let me ask you this: Do you understand what I am trying to express?

#

If you don't I'll attempt to rephrase

#

but I think you do

fast osprey
#

I think I understand what you're trying to communicate but the key misunderstanding is that a "dead" channel isn't an inherently bad thing and a sign that channels need to be collapsed

#

It is perfectly fine for one channel to be kept for a purpose and for it to be silent when that purpose isn't being actively utilized

stark ingot
#

sounds a lot like an opinion

fast osprey
#

If there something that isn't fine about it, one could have a dialogue about it mmLul

celest latch
#

Is it possible to keep a robot running using Python?

fast osprey
#

Yup

oblique yarrow
#

Hi! Everyone!

#

I am here to work and gain experience with some fun? In discord.py .

#

Did anybody can help us in this

With thanks!

#

Its not paid

#

If you are interested than DM me.

fast osprey
#

If you have a question you can ask it here. Always better to get more opinions than trusting one random person in private

oblique yarrow
#

Brothers where from I need to start Lea4ning

fast osprey
#

Do you have python experience?

oblique yarrow
#

Yes

oblique yarrow
fast osprey
#

If you have good fundamentals, the next step is to pick which library you want to use. Discord.py is the oldest but there are multiple alternatives too. Each of them will have documentation, examples, and a support server if you need more in depth help

oblique yarrow
#

OK thanks

rich kettle
#

can anyone thats good with api's dm me

stark ingot
#

Ahh your one of those scummy account resellers or boost resellers

fast osprey
#

Wild when people ask for help to exploit and steal from a platform on that same platform

tawny zenith
#

Hiii everyone I'm new here

#

want to create a welcome bot for my Instagram group chat. I’m new to this and don’t know how to start. I kinda want to impress my crush there too so please help me out!

fast osprey
#

This channel is for discussing discord bots, you'll probably want to look elsewhere for instagram things

tawny zenith
#

Oh okay, got it Do you happen to know where I could find resources or communities for Instagram bots?

fast osprey
#

Don't even use instagram myself KEK

gritty inlet
#

I'm 99% sure you cannot have your own bot in a group chat on IG

tawny zenith
#

Ah okay, thanks for letting me know πŸ˜…

tawny zenith
gritty inlet
#

Maybe those are Instagram integrations (or, unlikely, automated users)

tawny zenith
#

Ohhh I see. So it’s probably some kind of integration then?

#

I was thinking it was a real user, but 24/7 auto-reply makes sense now

somber sky
#

does anyone know how to fix discord bot integrations doubling in bot and client

fast osprey
#

What do you mean by integrations

tepid juniper
#

Does anyone know how to work with blockcypher with discord bots? struggling alot with rate limits idk how to fix

fast osprey
#

Code/error?

gritty inlet
#

Some Bitcoin stuff

#

Sketchy business