Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Functions and Improvements #254

Merged
merged 26 commits into from
Aug 4, 2021
Merged

New Functions and Improvements #254

merged 26 commits into from
Aug 4, 2021

Conversation

DevSpen
Copy link
Contributor

@DevSpen DevSpen commented Jul 24, 2021

Type

  • Improvement: Added more properties to $msg
  • Functions: $removeLinks, $removeNumbers, $removeNewLines $rulesChannelID, $suppressEmbeds, $unsuppressEmbeds, $shardCount, $removeSpecialChars

Breakdown

  • $removeLinks[text] - Removes links from the provided text.
  • $removeNumbers[text] - Removes numbers from the provided text.
  • $removeNewLines[text] - Removes all new lines from the provided text.
  • $rulesChannelID[(optional) guildID] - Returns the server's rules channel ID.
  • $suppressEmbeds[messageID;channelID] - Suppresses embedded content from a message.
  • $unsuppressEmbeds[messageID;channelID] - Unsuppresses embedded content from the embed-suppressed message.
  • $shardCount - Returns how many shards the bot has.
  • $removeSpecialChars[text] - Removes special characters from the provided text.
  • New properties in $msg include: webhookid, issystem, type, istts, editedtimestamp, editedat, iscrosspostable

Description

Made some new functions and improvements.

I'm open to feedback and suggestions.

@Leref
Copy link
Member

Leref commented Jul 24, 2021

Before merging / accepting,
I would suggest the new functions to use the correct format of catching / returning errors.

@DevSpen
Copy link
Contributor Author

DevSpen commented Jul 24, 2021

Before merging / accepting,
I would suggest the new functions to use the correct format of catching / returning errors.

  • Fixed the issues in $rulesChannelID

Lmk if any others use the old system.

@USERSATOSHI USERSATOSHI self-assigned this Jul 27, 2021
@USERSATOSHI USERSATOSHI added type: improvement additional improvements Functions labels Jul 27, 2021
@USERSATOSHI USERSATOSHI removed their assignment Aug 1, 2021
Copy link
Member

@Leref Leref left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging.

package/functions/funcs/suppressEmbeds.js Show resolved Hide resolved
package/functions/funcs/unsuppressEmbeds.js Show resolved Hide resolved
@Leref Leref merged commit adb54b9 into aoijs:dev Aug 4, 2021
@DevSpen DevSpen mentioned this pull request Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement additional improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants