#๐ explaining a certain part of a code
10 messages ยท Page 1 of 1 (latest)
@gloomy pelican
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Represents the spawn internal system per guild. Contains the counters that will determine
if a countryball should be spawned next or not.
Attributes
----------
time: datetime
Time when the object was initialized. Block spawning when it's been less than two minutes
amount: float
A number starting at 0, incrementing with the messages until reaching `chance`. At this
point, a ball will be spawned next.
chance: int
The number `amount` has to reach for spawn. Determined randomly with `SPAWN_CHANCE_RANGE`
lock: asyncio.Lock
Used to ratelimit messages and ignore fast spam
message_cache: ~collections.deque[CachedMessage]
A list of recent messages used to reduce the spawn chance when too few different chatters
are present. Limited to the 100 most recent messages in the guild.```
Can anyone make a text on this in approximately 250 words, it would be very appreciated, thanks ๐
Ps this is the full code https://paste.pythondiscord.com/INQQ
Thata's not really code. That's just the docstring of a class.
Yeah, but since i only know simple stuff i don't know what half of the stuff is
It's just describing the attributes of the class. Note how it describes the "time" attribute:
time: datetime Time when the object was initialized. Block spawning when it's been less than two minutes
And then below the docstring is a time attribute:
time: datetime
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.