Skip to content

Commit

Permalink
Merge development. Resolve conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerrie-Aries committed Nov 26, 2023
2 parents 5cf3f06 + c48da76 commit 6bbd2ea
Show file tree
Hide file tree
Showing 54 changed files with 4,654 additions and 1,875 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patreon : JerrieAries
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug Report
description: File a bug report
assignees: "Jerrie-Aries"
title: "[BUG]: your bug report title"
labels: "Maybe bug"
body:
- type: markdown
attributes:
value: >
Thanks for taking the time to fill out a bug.
Please note that this form is for bugs only!
- type: input
id: bot-info-version
attributes:
label: Bot Version
description: Check with `?about` command.
placeholder: eg. v4.0.0
validations:
required: true
- type: dropdown
id: hosting-method
attributes:
label: Hosting method
description: Check with `?about` command.
multiple: true
options:
- Heroku
- Railway
- Systemd
- PM2
- Patreon
- Local
- Other
validations:
required: true
- type: dropdown
id: plugin-involved
attributes:
label: Plugins
description: Plugins that involved with the bug.
multiple: true
options:
- Announcement
- Embed Manager
- Extended Utils
- Giveaway
- Invites
- Keepalive
- Logviewer
- Moderation
- Role Manager
- Support Utility
- Trivia
- Other
validations:
required: true
- type: input
attributes:
label: Summary
description: A simple summary of your bug report.
validations:
required: true
- type: textarea
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Error Logs
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: haskell
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: You may add screenshots to further explain your problem, if any.
- type: textarea
id: additional-info
attributes:
label: Additional Information
description: If there is anything else to say, please do so here.
53 changes: 53 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Feature Request
description: Suggest a feature or idea for this project
assignees: "Jerrie-Aries"
title: "[FEATURE] feature title"
labels: "Feature request"
body:
- type: input
attributes:
label: Summary
description: >
A short summary of what your feature request is.
validations:
required: true
- type: dropdown
attributes:
label: What plugin is the feature request for?
multiple: true
options:
- Announcement
- Embed Manager
- Extended Utils
- Giveaway
- Invites
- Keepalive
- Logviewer
- Moderation
- Role Manager
- Support Utility
- Trivia
- Other
validations:
required: true
- type: textarea
attributes:
label: The Problem
description: >
What problem is your feature trying to solve?
What becomes easier or possible when this feature is implemented?
- type: textarea
attributes:
label: The Ideal Solution
description: >
What is your ideal solution to the problem?
What would you like this feature to do?
- type: textarea
attributes:
label: The Current Solution
description: >
What is the current solution to the problem, if any?
- type: textarea
attributes:
label: Additional Context
description: If there is anything else to say, please do so here.
46 changes: 29 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,44 @@
[![Code-Style](https://img.shields.io/badge/Code%20Style-Black-000000.svg)](https://github.com/python/black)
[![GitHub-License](https://badgen.net/github/license/Jerrie-Aries/modmail-plugins?label=License)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/LICENSE)


## Modmail Plugins

Custom plugins for [Modmail bot](https://github.com/kyb3r/modmail).

Checkout the [wiki](https://github.com/Jerrie-Aries/modmail-plugins/wiki) for latest news and additional info.

__**Important:**__
Plugins with `*` mark after their names in the table below require `Extended Utils` plugin to work.
It must be installed before the ones with `*` mark, otherwise you have to reload those plugins.
To install it, use command:
It must be installed before those ones with `*`. Otherwise you have to remove and reinstall those plugins.
To install `Extended Utils` plugin, use command:
```
?plugin add Jerrie-Aries/modmail-plugins/utils
```

## How to install

Use the format of `?plugin add Jerrie-Aries/modmail-plugins/<plugin_name><@branch>` where `<plugin_name>` (use without `<` and `>`) is the name of the plugin file. `<@branch>` is optional, defaults to `master`.

Example:
```
?plugin add Jerrie-Aries/modmail-plugins/trivia
```
to add the trivia plugin.


## List of plugins
[![Announcement](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fannouncement%2Finfo.json&query=%24.version&style=popout&label=Announcement&labelColor=darkgreen&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/announcement)
[![Embed Manager](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fembedmanager%2Finfo.json&query=%24.version&style=popout&label=Embed%20Manager&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/embedmanager)
[![Extended Utils](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Futils%2Finfo.json&query=%24.version&style=popout&label=Extended%20Utils&labelColor=gold&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/utils)
[![General Info](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fgeneralinfo%2Finfo.json&query=%24.version&style=popout&label=General%20Info&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/generalinfo)
[![Giveaway](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fgiveaway%2Finfo.json&query=%24.version&style=popout&label=Giveaway&labelColor=darkgreen&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/giveaway)
[![Invites](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Finvites%2Finfo.json&query=%24.version&style=popout&label=Invites&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/invites)
[![Keepalive](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fkeepalive%2Finfo.json&query=%24.version&style=popout&label=Keepalive&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/keepalive)
[![Logviewer](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Flogviewer%2Finfo.json&query=%24.version&style=popout&label=Logviewer&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/logviewer)
[![Moderation](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fmoderation%2Finfo.json&query=%24.version&style=popout&label=Moderation&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/moderation)
[![Role Manager](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Frolemanager%2Finfo.json&query=%24.version&style=popout&label=Role%20Manager&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/rolemanager)
[![RTFM](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Frtfm%2Finfo.json&query=%24.version&style=popout&label=RTFM&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/rtfm)
[![Support Utility](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Fsupportutils%2Finfo.json&query=%24.version&style=popout&label=Support%20Utility&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/supportutils)
[![Trivia](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fgithub.com%2FJerrie-Aries%2Fmodmail-plugins%2Fraw%2Fmaster%2Ftrivia%2Finfo.json&query=%24.version&style=popout&label=Trivia&color=blue&prefix=v)](https://github.com/Jerrie-Aries/modmail-plugins/blob/master/trivia)

| Name | Name for command | Description |
| --- | --- | --- |
| Announcement | `announcement` | Post announcements on your server with this plugin. Publishing announcements to subscribed channels is also supported. |
| Embed Manager`*` | `embedmanager` | Manage, post, edit, store embeds with this plugin. This plugin is a modified version of `embedutils` cog made by [PhenoM4n4n](https://github.com/phenom4n4n). Any credits must go to original developer of this cog. Original repository can be found [here](https://github.com/phenom4n4n/phen-cogs/tree/master/embedutils). |
| Extended Utils | `utils` | Entended utils from various sources to work with other plugins. |
| General Info | `generalinfo` | Get general information about bot, guild member, Discord user, server and many more. |
| Giveaway | `giveaway` | Host giveaways on your server with this plugin. The source code was from [officialpiyush/modmail-plugins/giveaway](https://github.com/officialpiyush/modmail-plugins/tree/master/giveaway). |
| Invites`*` | `invites` | Checks which invite is used when someone joins the server, and the log embed will be posted in the designated channel. |
| Keep Alive | `keepalive` | Hosting on Replit? Keep Alive plugin is specifically for those who host their bots on Replit. This plugin will keep your bots up using [UptimeRobot](https://uptimerobot.com/) service to ping the web server created by the plugin. Read [Keep Alive plugin wiki](https://github.com/Jerrie-Aries/modmail-plugins/wiki/Keep-Alive-plugin-guide) for more info. |
| Log Viewer | `logviewer` | Start the logviewer server with plugin? Yes. This plugin is a modified version of kyb3r's [logviewer](https://github.com/kyb3r/logviewer). Any credits must go to original developers. If you want to use this plugin, make sure to read the [wiki](https://github.com/Jerrie-Aries/modmail-plugins/wiki/Log-Viewer-plugin) first. |
| Logviewer | `logviewer` | Start the logviewer server with plugin? Yes. This plugin is a modified version of [modmail-dev/logviewer](https://github.com/modmail-dev/logviewer). Any credits must go to original developers. If you want to use this plugin, make sure to read the [wiki](https://github.com/Jerrie-Aries/modmail-plugins/wiki/Logviewer-plugin) first. |
| Moderation`*` | `moderation` | Moderate your server with moderation plugin. This plugin supports kick, ban, add/remove roles, mute and temp mute, change nicknames, and many more. |
| Role Manager`*` | `rolemanager` | Manage roles on your server. This plugin includes Auto Role, Mass Roling, Reaction Roles, and Targeter (a tool to search members that match the given args). This plugin is a combination and modified version of `roleutils` cog made by [PhenoM4n4n](https://github.com/phenom4n4n), and `targeter` cog made by [NeuroAssassin](https://github.com/NeuroAssassin). |
| RTFM | `rtfm` | RTFM commands for developers to easily fetch `discord.py` and `python` documentation links. Converted from [RoboDanny](https://github.com/Rapptz/RoboDanny). |
Expand All @@ -48,7 +50,17 @@ to add the trivia plugin.

`*` : Requires *Extended Utils* plugin to work.

## How to install

Use the format of `?plugin add Jerrie-Aries/modmail-plugins/<plugin_name><@branch>` where `<plugin_name>` (use without `<` and `>`) is the name of the plugin file. `<@branch>` is optional, defaults to `master`.

Example:
```
?plugin add Jerrie-Aries/modmail-plugins/moderation
```
to add the Moderation plugin.


## Reporting bugs and errors
If you encounter any bugs or errors, just open a new issue [here](https://github.com/Jerrie-Aries/modmail-plugins/issues/new) and report it.
Or you can report it on Modmail's [support](https://discord.gg/zmdYe3ZVHG) server in [`#plugin-support`](https://discord.com/channels/1079074933008781362/1079077960876838992) channel.
Or you can report it on Modmail's [support](https://discord.gg/zmdYe3ZVHG) server in [`#plugin-support`](https://discord.com/channels/1079074933008781362/1083494845508751450) channel.
32 changes: 18 additions & 14 deletions announcement/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@
_short_length = 256
_long_length = 4000

_embed_input_description = (
"Click the `Edit` button below to set/edit the values.\n\n"
"__**Available fields:**__\n"
"- **Mention** : Mention @User, @Role, @here, or @everyone. "
"Multiple mentions is also supported, just separate the values with space. "
"For User or Role, you may pass an ID, mention (in the format of `<@id>` for User or `<@&id>` for Role), or name.\n"
"- **Description** : The content of the announcement. Must not exceed 4000 characters.\n"
"- **Thumbnail URL** : URL of the image shown at the top right of the embed.\n"
"- **Image URL** : URL of the large image shown at the bottom of the embed.\n"
"- **Color** : The color code of the embed. If not specified, fallbacks to bot main color. "
"The following formats are accepted:\n - `0x<hex>`\n - `#<hex>`\n - `0x#<hex>`\n - `rgb(<number>, <number>, <number>)`\n"
"Like CSS, `<number>` can be either 0-255 or 0-100% and `<hex>` can be either a 6 digit hex number or a 3 digit hex shortcut (e.g. #fff).\n\n"
)

_plain_input_description = "Click the `Edit` button below to set/edit the content."


class AnnouncementTextInput(TextInput):
def __init__(self, name: str, **kwargs):
Expand Down Expand Up @@ -244,21 +260,9 @@ async def set_announcement_type(self, value: str) -> None:
"max_length": _short_length,
}
self.inputs.update(content=self.content_data, **self.embed_data)
description += (
"Click the `Edit` button below to set/edit the values.\n\n"
"__**Available fields:**__\n"
"- **Mention** : Mention @User, @Role, @here, or @everyone.\n"
"Multiple mentions is also supported, just separate the values with space.\n"
"For User or Role, you may pass an ID, mention (in the format of `<@id>` for User or `<@&id>` for Role), or name.\n"
"- **Description** : The content of the announcement. Must not exceed 4000 characters.\n"
"- **Thumbnail URL** : URL of the image shown at the top right of the embed.\n"
"- **Image URL** : URL of the large image shown at the bottom of the embed.\n"
"- **Color** : The color code of the embed. If not specified, fallbacks to bot main color.\n"
"The following formats are accepted:\n\t- `0x<hex>`\n\t- `#<hex>`\n\t- `0x#<hex>`\n\t- `rgb(<number>, <number>, <number>)`\n"
"Like CSS, `<number>` can be either 0-255 or 0-100% and `<hex>` can be either a 6 digit hex number or a 3 digit hex shortcut (e.g. #fff).\n\n"
)
description += _embed_input_description
else:
description += "Click the `Edit` button below to set/edit the content."
description += _plain_input_description
embed = self.message.embeds[0]
embed.description = description
await self.update_view()
Expand Down
4 changes: 2 additions & 2 deletions announcement/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"Create and post announcements.",
"\n**Version:**\n`{0}`"
],
"author": "Jerrie-Aries",
"version": "1.1.3",
"authors": ["Jerrie-Aries"],
"version": "1.1.4",
"bot_version": "4.0.0",
"dpy_version": "2.0.0"
}
Loading

0 comments on commit 6bbd2ea

Please sign in to comment.