Giter Club home page Giter Club logo

legacypygamecommunitybot's People

Contributors

ankith26 avatar avaxar avatar belvix avatar bydariogamer avatar coolstuff123 avatar mega-jc avatar oddbookworm avatar sss-says-snek avatar zoldalma999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

legacypygamecommunitybot's Issues

Þé sandbox snék shall display surfaces when printed.

Feature Request by Avaxar#6412, on Mar. 27, 2021
▪︎Þé sandbox snék shall display surfaces when printed.

In þé included print function

if isinstance(val[0], pygame.Surface):
output.img = val[0]
else:
output.text += sep.join(val) + end

pg!doc should split long strings of text into multiple embeds

Feature Request by Mega_JC#7835, on Apr. 13, 2021

• pg!doc should split long strings of text into multiple embeds
- Text paragraphs could be grouped into blocks, and they
would be distributed along embeds based on their lengths

Helpful Link(s):
N/A

`pg!doc` sometimes raises error when module does not exist

By bydariogamer#7949, on 1th June, 2021

Expected behaviour

  • The bot should have changed the answer embed with the documentation to a new error. I think pygame.movie existed in the past, but it might not be too relevant.

Replication data

PygameBot does not recognize commands when followed by newline character

by GhostMander#0760 and Ghast#4475, on 1st May, 2021

Expected Behavior

  • Bot should see the newline character \n as whitespace and ignore it, then execute the command

Replication Data

`pg!info` raises `AttributeError` when the input ID is not a server member

By Mega_JC#7835, on 21st May, 2021

Expected behaviour

  • Like for any other user, the bot should show an information embed for the given input IDs when possible, and not raise an internal exception.

Replication data

Command response messages with an error should be deleted if their invocation messages get deleted

Is your feature request related to a problem? Please describe.
When people run commands with the bot with syntax errors, they often forget that the bot can respond to corrections of their initial invocation messages, so they call a command in a new message, with the first response message of the bot (showing their error) remaining in place, even when they delete their first invocation message. Usually, those people aren't able to delete messages by the bot, so the error simply remains.

Describe the solution you'd like
A simple solution to this problem is to allow the bot to respond to the deletion of command invocation messages by deleting its response message if it refers to a command error.

pg!browse Admin Command for paginating through the messages of a channel

by Mega_JC,#7835, on Jun. 8, 2021

PygameBot should be able to paginate through the messages of a specified channel in a specified range.
Potential Syntax:
pg!browse [before=] [after=] [around=] [mode=0]

When the paginator times out, and someone refreshes the paginator using pg!refresh, the range that was initially specified should be remembered.

mode= should have 2 possible values:
1: Only paginate through the text content of a message.
2: Use a placeholder message to represent the message and embed currently being viewed by the paginator.
Helpful Links

Embed field support for pg!emsudo

Feature Request by Mega_JC#7835, on Mar. 3, 2021

• Embed field support for pg!emsudo
- PygameBot should recognize syntax like
<$EmbedField|Title| Body|>
using e.g. regular expressions and turn it into an
Embed field (see s? help from @statbot )

Helpful Link(s):
- https://regex101.com/r/k5si58/1
- https://discordpy.readthedocs.io/en/latest/api.html?highlight=embed#discord.Embed.add_field
- https://www.dataquest.io/blog/regex-cheatsheet/
- https://www.shortcutfoo.com/app/dojos/python-regex/cheatsheet
- https://docs.python.org/3/library/re.html
- https://www.programiz.com/python-programming/regex

Polling functionality

Feature Request by Mega_JC#7835, on Feb. 27, 2021

• Polling functionality :
- pg!poll {text} {(emoji1, emoji2, ...)}
for making polls for decision-making by the
community

• Useful for contributors to get user votes on
new features or for surveys

Add support for gifs in pg!exec

Feature Request by pirosalma#1362, on May. 2, 2021
Add support for gifs in pg!exec

This is something I suggested already and is for later but Ill put up a request anyway.
When output.img is a list instead of an pygame.Surface the bot would create a gif of those frames.
Till pygame supports something like this I put some workaround options in the 'helpful links' part. If I find another option I will update the embed.
Helpful Links
-imageio (Requires a new module, including numpy (which we should have and Pillow, which is also big afaik))

-ffmpeg (big in size and is a command line utility which means it has to be downloaded manually. This is the last option I would implement/recommend)

-pillow (Again, additional module to install.)

Use __doc__ instead of hardcoded pg!help embed

Feature Request by pirosalma#1362, on Apr. 16, 2021

• Use doc instead of hardcoded pg!help embed
- The help command should iterate trough all the functions in cmds_and_funcs
and build the embed from the docstring of the functions.

Helpful Link(s):
...

Internal error on pg!remind

By Mega_JC#7835, on 12th May, 2021

Internal error in bot is triggered when the invocation message for pg!remind was deleted prior to the end of the reminder
A discord.HTTPException is raised when the invocation message for the pg!remind command was deleted before the user could be reminded

Expected Behavior

  • The bot should not reply to a message that doesn't exist anymore, and should send a reminder message mentioning user who invoked the command, without a reply.

Replication Data

  • Add a reminder to the bot for a period of time where you can delete the invocation message before getting reminded to replicate the issue.

pg!clock must take some more optional arguments, so that every time a change needs to be done, the source need not be modified.

Feature Request by Ankith#9014, on Apr. 2, 2021

pg!clock must take some more optional arguments, so that every time a change needs to be done, the source need not be modified.

People on the clock must be able to run something like
pg!clock update [timezone offset in hours] [optional color argument]
To update their timezone on the clock

Additionally, people on the clock command must be allowed to run
pg!clock remove
That’s gonna remove them from the clock

Admins commands

Admins can runs commands in above format, and also specify a member to make the changes on. The update command can also be used to add people in this case.

Helpful Link(s):
N/A

Asynchronous Task Management System

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A task module that defines a set of base classes which can be subclassed in order to implement specific types of task classes (interval based, event based, etc.) in the server for the bot to run. These classes would produce independent task instances as objects, which run based on specific data given as input. All active tasks would be managed by a task manager object which keeps track of them and can view, modify, pause, stop, restart or kill tasks at runtime.

Describe alternatives you've considered
In the end, one could argue that all of this can be implemented using a simple discord.ext.tasks.loop decorator bound to a function, but this alone is very inflexible, and misses out on the many possibilities that an OOP-based task system offers.

Automatic messaging from PygameBot to new users to #arrivals-👋

Feature Request by Baconinvader#2781, on March 1, 2021

• Automatic messaging from PygameBot to new users in #arrivals-👋
- Something like "Welcome @ user! Check out our #rules and #guidance-⚙ channels, grab some #roles-🎓 , and have fun with pygame!"

• Please I get a feeling of dread whenever I see a new message in #arrivals-👋

Revamped pg!clock return image

Feature Request by Mega_JC#7835

• Revamped pg!clock return image
- Proper handling of overlapping
timezones for members

Test

The standard Lorem Ipsum passage, used since the 1500s
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."

Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"

1914 translation by H. Rackham
"But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?"

Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC
"At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."

1914 translation by H. Rackham
"On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."

pg!exec incorrect line numbers

by Mega_JC#7835, on 22nd March, 2021

Bug:

  • pg!exec exception line numbers are incorrect
  • The exception line numbers for exceed the line count of the code block used to run the code

Expected behavior:

  • The exceptions should only account for the line count of the code that is run with pg!exec

Replication data:

A much better role-less people notice system.

Feature Request by Avaxar#6412, on Feb. 26, 2021

• A much better role-less people notice system.
• The bot will react :regional_indicator_r::regional_indicator_o::regional_indicator_l::regional_indicator_e::regional_indicator_s:❗ to every message a role-less person sent in a help channel.
• Make the role-less notice message much more "threatening"

Editing PygameBot 's messages

Feature Request by Mega_JC#7835, on Jan. 18, 2021

• Editing PygameBot 's messages
- e.g. pg!sudo!edit {message_id} {text},
pg!emsudo!edit {message_id} {text}

pg!exec crash on syntax error

by bydariogamer#7949, on 27th March, 2021

Bug:

  • bot crashes when the code that is run with pg!exec causes a specific type of SyntaxError, SyntaxError: unexpected EOF while parsing

Expected behavior:

  • The exception caused by this error should by the bot like other SyntaxErrors
  • This exception should be caught by the bot sandbox and not show up in the Bot Heroku Logs.

Replication data:

Implement an Asynchronous Task Management system using OOP principles

Is your feature request related to a problem? Please describe.
Our current way of running asynchronous tasks that run in the background (e.g. bot reminders) is very limited. For instance, it isn't currently possible to dispatch a discord API event to several task functions at once. We also have no control of them at runtime, which could be very important for scenarios where a task function should end prematurely, either due to bugs or other server-specific reasons.

Describe the solution you'd like
A jobs module that defines a set of base classes which can be subclassed in order to implement specific types of job classes (interval based, event based, etc.) in the server for the bot to run. These classes would produce independent job instances as objects, which run based on specific data given as input. All active jobs would be managed by a job manager object which keeps track of them and can view, modify, pause, stop, restart or kill jobs at runtime. It should also be responsible for dispatching discord API events to the job types that support them. Job objects should also be able to interact with other jobs in different ways, like allowing other jobs to be notified when one job is finished/killed, or when it has produced a specific type of output. There would also need to be a permission system that prevents some tasks from stopping/killing other ones at runtime.

Describe alternatives you've considered
In the end, one could argue that all of this can be implemented using a simple discord.ext.tasks.loop decorator bound to a function and other data structures, but this alone is very inflexible, and misses out on the many possibilities that an OOP-based task system offers.

A help command for the bot, pg!help

Feature Request by Ankith#9014, on Feb. 18, 2021
• A help command for the bot, pg!help.
• Should display some basic info regarding the bot, listing all commands available
• Should also provide help on the individual commands

Better pg!emsudo cmd

Feature Request by Mega_JC#7835, on Apr. 13, 2021

• Better pg!emsudo cmd
- should support all Embed features accessible through
the Discord Python API discord.py
- Syntax for embed fields should change from <Field|Title|Description|Inline> to <Title|Description|Inline>

- dict syntax:

pg!emsudo {
'title': 'TITLE',
'url': 'URL',
'description': 'DESC',
'color': 0,
'fields': [
{
'name': 'NAME',
'value': 'VAL',
'inline': True/False,
}
],
'author': {
'name': 'AUT_NAME',
'url': 'AUT_URL',
'icon_url': 'AUT_ICON'
},
'thumbnail': {
'url': 'THUMB_URL'
},
'image': {
'url': 'IMG_URL'
},
'footer': {
'text': 'TEXT',
'icon_url': 'FOOTER_IMG'
}
"timestamp": "TIMESTAMP"
}

  • Possible command arguments:
    pg!emsudo (

"author_name" or ("author_name", "author_url") or ("author_name", "author_url", "icon_url"),

"title" or ("title", "title_url") or ("title", "title_url", "thumbnail_url"),

"""desc.""" or ("""desc.""", "image_url"),

0xabcdef, # or -1 for def.

(
"""
<name|
...value....
|inline>
""",
),

"footer_text" or ("footer_text", "footer_icon_url"),

datetime(year, month, day[, hour[, minute[, second[, microsecond]]]]) or "2021-04-17T17:36:00.553"
)

  • Embed property mapping (see image):
    Image1
    pg!emsudo (

1 or (1, 1.1) or (1, 1.1, 1.2),

2 or (2, 2.1) or (2, 2.1, 2.2),

3 or (3, 3.1),

4,

[
5, 5.1...
],

6 or (6, 6.1),

7
)

  • Arguments should be able to be excluded, but must also remain strictly positional (passing arguments in the form of 1, 2, 3, ..x is allowed, but not in the form of 1, 3, 4, ...x)

Helpful Link(s):
https://leovoel.github.io/embed-visualizer/
https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.