forked from TeamInklings/Octobot
Rebrand to Octobot Stealth #1
14 changed files with 77 additions and 278 deletions
|
@ -5,17 +5,17 @@
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<Version>2.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
<Title>Octobot</Title>
|
<Title>Octobot Stealth</Title>
|
||||||
<Authors>Octol1ttle, mctaylors, neroduckale</Authors>
|
<Authors>TeamInklings, TeamOctolings</Authors>
|
||||||
<Copyright>AGPLv3</Copyright>
|
<Copyright>AGPLv3</Copyright>
|
||||||
<PackageProjectUrl>https://github.com/TeamOctolings/Octobot</PackageProjectUrl>
|
<PackageProjectUrl>https://git.mctaylors.ru/TeamInklings/OctobotStealth</PackageProjectUrl>
|
||||||
<PackageLicenseUrl>https://github.com/TeamOctolings/Octobot/blob/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://git.mctaylors.ru/TeamInklings/OctobotStealth/src/branch/stealth/LICENSE</PackageLicenseUrl>
|
||||||
<RepositoryUrl>https://github.com/TeamOctolings/Octobot</RepositoryUrl>
|
<RepositoryUrl>https://git.mctaylors.ru/TeamInklings/OctobotStealth</RepositoryUrl>
|
||||||
<RepositoryType>github</RepositoryType>
|
<RepositoryType>github</RepositoryType>
|
||||||
<Company>TeamOctolings</Company>
|
<Company>TeamInklings</Company>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
<Description>A general-purpose Discord bot for moderation written in C#</Description>
|
<Description>A fork of multiple-purpose Discord bot written in Remora.Discord</Description>
|
||||||
<ApplicationIcon>docs/octobot.ico</ApplicationIcon>
|
<ApplicationIcon>docs/octobot.ico</ApplicationIcon>
|
||||||
<GitVersion>false</GitVersion>
|
<GitVersion>false</GitVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
|
@ -1,128 +0,0 @@
|
||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, religion, or sexual identity
|
|
||||||
and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
|
||||||
community include:
|
|
||||||
|
|
||||||
* Demonstrating empathy and kindness toward other people
|
|
||||||
* Being respectful of differing opinions, viewpoints, and experiences
|
|
||||||
* Giving and gracefully accepting constructive feedback
|
|
||||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
||||||
and learning from the experience
|
|
||||||
* Focusing on what is best not just for us as individuals, but for the
|
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery, and sexual attention or
|
|
||||||
advances of any kind
|
|
||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or email
|
|
||||||
address, without their explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported to the community leaders responsible for enforcement via the "Report Content" feature or via email at
|
|
||||||
l1ttleofficial@outlook.com.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series
|
|
||||||
of actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or
|
|
||||||
permanent ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within
|
|
||||||
the community.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
||||||
version 2.0, available at
|
|
||||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
||||||
enforcement ladder](https://github.com/mozilla/diversity).
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
https://www.contributor-covenant.org/faq. Translations are available at
|
|
||||||
https://www.contributor-covenant.org/translations.
|
|
|
@ -1,68 +0,0 @@
|
||||||
# Contributing Guidelines
|
|
||||||
|
|
||||||
Thank you for showing interest in the development of Octobot. We aim to provide a good collaborating environment for
|
|
||||||
everyone involved, and as such have decided to list some of the most important things to keep in mind in the process.
|
|
||||||
Before starting, please read our [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
||||||
|
|
||||||
## Reporting bugs
|
|
||||||
|
|
||||||
A **bug** is a situation in which there is something clearly wrong with the bot. Examples of applicable bug reports are:
|
|
||||||
|
|
||||||
- The bot doesn't reply to a command
|
|
||||||
- The bot sends the same message twice
|
|
||||||
- The bot takes a long time to a respond if I use this specific command
|
|
||||||
- An embed the bot sent has incorrect information in it
|
|
||||||
|
|
||||||
To track bug reports, we primarily use GitHub **issues**. When opening an issue, please keep in mind the following:
|
|
||||||
|
|
||||||
- Before opening the issue, please search for any similar existing issues using the text search bar and the issue
|
|
||||||
labels. This includes both open and closed issues (we may have already fixed something, but the fix hasn't yet been
|
|
||||||
released).
|
|
||||||
- When opening the issue, please fill out as much of the issue template as you can. In particular, please make sure to
|
|
||||||
include console output and screenshots as much as possible.
|
|
||||||
- We may ask you for follow-up information to reproduce or debug the problem. Please look out for this and provide
|
|
||||||
follow-up info if we request it.
|
|
||||||
|
|
||||||
## Submitting pull requests
|
|
||||||
|
|
||||||
While pull requests from unaffiliated contributors are welcome, please note that the core team *may* be focused on
|
|
||||||
internal issues that haven't been published to the issue tracker yet. Reviewing PRs is done on a best-effort basis, so
|
|
||||||
please be aware that it may take a while before a core maintainer gets around to review your change.
|
|
||||||
|
|
||||||
The [issue tracker](https://github.com/TeamOctolings/Octobot/issues) should provide plenty of issues to start with.
|
|
||||||
Make sure to check that an issue you're planning to resolve does not already have people working on it and that there
|
|
||||||
are no PRs associated with it
|
|
||||||
|
|
||||||
In the case of simple issues, a direct PR is okay. However, if you decide to work on an existing issue which doesn't
|
|
||||||
seem trivial, **please ask us first**. This way we can try to estimate if it is a good fit for you and provide the
|
|
||||||
correct direction on how to address it.
|
|
||||||
|
|
||||||
If you'd like to propose a subjective change to one of the UI/UX aspects of the bot, or there is a bigger task you'd
|
|
||||||
like to work on, but there is no corresponding issue yet for it, **please open an issue first** to avoid wasted effort.
|
|
||||||
|
|
||||||
Aside from the above, below is a brief checklist of things to watch out when you're preparing your code changes:
|
|
||||||
|
|
||||||
- Make sure you're comfortable with the principles of object-oriented programming, the syntax of C\# and your
|
|
||||||
development environment.
|
|
||||||
- Make sure you are familiar with [git](https://git-scm.com/)
|
|
||||||
and [the pull request workflow](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests).
|
|
||||||
- Please do not make code changes via the GitHub web interface.
|
|
||||||
- Please make sure your development environment respects the .editorconfig file present in the repository. Our code
|
|
||||||
style differs from most C\# projects and is closer to something you see in Java projects.
|
|
||||||
- Please test your changes. We expect most new features and bugfixes to be tested in an environment similar to
|
|
||||||
production.
|
|
||||||
|
|
||||||
After you're done with your changes and you wish to open the PR, please observe the following recommendations:
|
|
||||||
|
|
||||||
- Please submit the pull request from
|
|
||||||
a [topic branch](https://git-scm.com/book/en/v2/Git-Branching-Branching-Workflows#_topic_branch) (not `master`), and
|
|
||||||
keep the *Allow edits from maintainers* check box selected, so that we can push fixes to your PR if necessary.
|
|
||||||
- Please avoid pushing untested or incomplete code.
|
|
||||||
- Please do not force-push or rebase unless we ask you to.
|
|
||||||
- Please do not merge `master` continually if there are no conflicts to resolve. We will do this for you when the change
|
|
||||||
is ready for merge.
|
|
||||||
|
|
||||||
We are highly committed to quality when it comes to Octobot. This means that contributions from less experienced
|
|
||||||
community members can take multiple rounds of review to get to a mergeable state. We try our utmost best to never
|
|
||||||
conflate a person with the code they authored, and to keep the discussion focused on the code at all times. Please
|
|
||||||
consider our comments and requests a learning experience.
|
|
|
@ -2,11 +2,13 @@
|
||||||
<img src="octobot-banner.png" alt="Octobot banner"/>
|
<img src="octobot-banner.png" alt="Octobot banner"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a href="https://github.com/TeamOctolings/Octobot/blob/master/LICENSE"><img src="https://img.shields.io/github/license/TeamOctolings/Octobot?logo=git"></img></a>
|
<a href="https://git.mctaylors.ru/TeamInklings/OctobotStealth/src/branch/stealth/LICENSE"><img src="https://img.shields.io/github/license/TeamOctolings/Octobot?logo=git"></img></a>
|
||||||
<a href="https://github.com/Remora/Remora.Discord"><img src="https://img.shields.io/badge/powered_by-Remora.Discord-blue"></img></a>
|
<a href="https://github.com/Remora/Remora.Discord"><img src="https://img.shields.io/badge/powered_by-Remora.Discord-blue"></img></a>
|
||||||
<a href="https://github.com/TeamOctolings/Octobot/commit/master"><img src="https://img.shields.io/github/last-commit/TeamOctolings/Octobot?logo=github"></img></a>
|
<a href="https://git.mctaylors.ru/TeamInklings/OctobotStealth/commits"><img src="https://img.shields.io/gitea/last-commit/TeamInklings/OctobotStealth/stealth?gitea_url=http%3A%2F%2Fgit.mctaylors.ru&logo=forgejo&logoColor=aaa"></img></a>
|
||||||
|
|
||||||
Veemo! I'm a general-purpose bot for moderation (formerly known as Boyfriend) written by [Team Octolings](https://github.com/TeamOctolings) in C# and Remora.Discord
|
Veemo! I'm a multiple-purpose bot (formerly known as Boyfriend) written by [Team Octolings](https://github.com/TeamOctolings) and [Team Inklings](https://git.mctaylors.ru/TeamInklings) in C# and Remora.Discord
|
||||||
|
|
||||||
|
> **Note** **[TeamOctolings/Octobot](https://github.com/TeamOctolings/Octobot) is still being maintained.** You probably won't need to use this fork.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -19,36 +21,19 @@ Veemo! I'm a general-purpose bot for moderation (formerly known as Boyfriend) wr
|
||||||
|
|
||||||
*...a-a-and more!*
|
*...a-a-and more!*
|
||||||
|
|
||||||
## Building Octobot
|
## Building Octobot Stealth
|
||||||
|
|
||||||
1. Install [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
|
1. Install [.NET 8 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
|
||||||
2. Go to the [Discord Developer Portal](https://discord.com/developers), create a new application and get a bot token. Don't forget to also enable all intents!
|
2. Go to the [Discord Developer Portal](https://discord.com/developers), create a new application and get a bot token. Don't forget to also enable all intents!
|
||||||
3. Clone this repository and open `Octobot` folder.
|
3. Clone this repository and open `OctobotStealth` folder.
|
||||||
```
|
```
|
||||||
git clone https://github.com/TeamOctolings/Octobot
|
git clone https://github.com/TeamInklings/OctobotStealth
|
||||||
cd Octobot
|
cd Octobot
|
||||||
```
|
```
|
||||||
4. Run Octobot using `dotnet` with `BOT_TOKEN` variable.
|
4. Run Octobot Stealth using `dotnet` with `BOT_TOKEN` variable.
|
||||||
```
|
```
|
||||||
dotnet run BOT_TOKEN='ENTER_TOKEN_HERE'
|
dotnet run BOT_TOKEN='ENTER_TOKEN_HERE'
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
When it comes to contributing to the project, the two main things you can do to help out are reporting issues and
|
|
||||||
submitting pull requests. Please refer to the [contributing guidelines](CONTRIBUTING.md) to understand how to help in
|
|
||||||
the most effective way possible.
|
|
||||||
|
|
||||||
## Special Thanks
|
|
||||||
|
|
||||||
![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)
|
|
||||||
|
|
||||||
[JetBrains](https://www.jetbrains.com/), creators of [ReSharper](https://www.jetbrains.com/resharper)
|
|
||||||
and [Rider](https://www.jetbrains.com/rider), supports Octobot with one of
|
|
||||||
their [Open Source Licenses](https://jb.gg/OpenSourceSupport).
|
|
||||||
Rider is the recommended IDE when working with Octobot, and everyone on the Octobot team uses it.
|
|
||||||
Additionally, ReSharper command-line tools made by JetBrains are used for status checks on pull requests to ensure code
|
|
||||||
quality even when not using ReSharper or Rider.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
<sup>Not an official Splatoon™ product. We are in no way affiliated with or endorsed by Nintendo Company, or other rightsholders.</sup>
|
<sup>Not an official Splatoon™ product. We are in no way affiliated with or endorsed by Nintendo Company, or other rightsholders.</sup>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 45 KiB |
BIN
docs/octobot.ico
BIN
docs/octobot.ico
Binary file not shown.
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 127 KiB |
|
@ -405,15 +405,6 @@
|
||||||
<data name="AboutBot" xml:space="preserve">
|
<data name="AboutBot" xml:space="preserve">
|
||||||
<value>About {0}</value>
|
<value>About {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AboutDeveloper@mctaylors" xml:space="preserve">
|
|
||||||
<value>developer & designer, Octobot's Wiki creator</value>
|
|
||||||
</data>
|
|
||||||
<data name="AboutDeveloper@Octol1ttle" xml:space="preserve">
|
|
||||||
<value>main developer</value>
|
|
||||||
</data>
|
|
||||||
<data name="AboutDeveloper@neroduckale" xml:space="preserve">
|
|
||||||
<value>developer</value>
|
|
||||||
</data>
|
|
||||||
<data name="ReminderCreated" xml:space="preserve">
|
<data name="ReminderCreated" xml:space="preserve">
|
||||||
<value>Reminder for {0} created</value>
|
<value>Reminder for {0} created</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -681,4 +672,7 @@
|
||||||
<data name="SettingsModeratorRole" xml:space="preserve">
|
<data name="SettingsModeratorRole" xml:space="preserve">
|
||||||
<value>Moderator role</value>
|
<value>Moderator role</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ButtonReportIssueDisabled" xml:space="preserve">
|
||||||
|
<value>Issue reports are disabled</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -405,15 +405,6 @@
|
||||||
<data name="AboutBot" xml:space="preserve">
|
<data name="AboutBot" xml:space="preserve">
|
||||||
<value>О боте {0}</value>
|
<value>О боте {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AboutDeveloper@neroduckale" xml:space="preserve">
|
|
||||||
<value>разработчик</value>
|
|
||||||
</data>
|
|
||||||
<data name="AboutDeveloper@Octol1ttle" xml:space="preserve">
|
|
||||||
<value>основной разработчик</value>
|
|
||||||
</data>
|
|
||||||
<data name="AboutDeveloper@mctaylors" xml:space="preserve">
|
|
||||||
<value>разработчик и дизайнер, создатель Octobot's Wiki</value>
|
|
||||||
</data>
|
|
||||||
<data name="ReminderCreated" xml:space="preserve">
|
<data name="ReminderCreated" xml:space="preserve">
|
||||||
<value>Напоминание для {0} создано</value>
|
<value>Напоминание для {0} создано</value>
|
||||||
</data>
|
</data>
|
||||||
|
@ -681,4 +672,7 @@
|
||||||
<data name="SettingsModeratorRole" xml:space="preserve">
|
<data name="SettingsModeratorRole" xml:space="preserve">
|
||||||
<value>Роль модератора</value>
|
<value>Роль модератора</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ButtonReportIssueDisabled" xml:space="preserve">
|
||||||
|
<value>Сообщения о проблемах отключены</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
public static class BuildInfo
|
public static class BuildInfo
|
||||||
{
|
{
|
||||||
public const string RepositoryUrl = "https://github.com/TeamOctolings/Octobot";
|
public const string RepositoryUrl = "https://git.mctaylors.ru/TeamInklings/OctobotStealth";
|
||||||
|
|
||||||
public const string IssuesUrl = $"{RepositoryUrl}/issues";
|
public const string IssuesUrl = $"{RepositoryUrl}/issues";
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,14 @@ namespace Octobot.Commands;
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public class AboutCommandGroup : CommandGroup
|
public class AboutCommandGroup : CommandGroup
|
||||||
{
|
{
|
||||||
private static readonly (string Username, Snowflake Id)[] Developers =
|
private static readonly (string Username, Snowflake Id)[] TeamInklings =
|
||||||
|
[
|
||||||
|
("mctaylors", new Snowflake(326642240229474304))
|
||||||
|
];
|
||||||
|
|
||||||
|
private static readonly (string Username, Snowflake Id)[] TeamOctolings =
|
||||||
[
|
[
|
||||||
("Octol1ttle", new Snowflake(504343489664909322)),
|
("Octol1ttle", new Snowflake(504343489664909322)),
|
||||||
("mctaylors", new Snowflake(326642240229474304)),
|
|
||||||
("neroduckale", new Snowflake(474943797063843851))
|
("neroduckale", new Snowflake(474943797063843851))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -61,7 +65,7 @@ public class AboutCommandGroup : CommandGroup
|
||||||
[Command("about")]
|
[Command("about")]
|
||||||
[DiscordDefaultDMPermission(false)]
|
[DiscordDefaultDMPermission(false)]
|
||||||
[RequireContext(ChannelContext.Guild)]
|
[RequireContext(ChannelContext.Guild)]
|
||||||
[Description("Shows Octobot's developers")]
|
[Description("Shows Octobot Stealth's developers")]
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
public async Task<Result> ExecuteAboutAsync()
|
public async Task<Result> ExecuteAboutAsync()
|
||||||
{
|
{
|
||||||
|
@ -84,8 +88,22 @@ public class AboutCommandGroup : CommandGroup
|
||||||
|
|
||||||
private async Task<Result> SendAboutBotAsync(IUser bot, Snowflake guildId, CancellationToken ct = default)
|
private async Task<Result> SendAboutBotAsync(IUser bot, Snowflake guildId, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder().Append("### ").AppendLine(Messages.AboutTitleDevelopers);
|
var builder = new StringBuilder().Append("### ").AppendLine(Messages.AboutTitleDevelopers)
|
||||||
foreach (var dev in Developers)
|
.AppendLine(Markdown.Bold(Markdown.Hyperlink("TeamInklings", "https://git.mctaylors.ru/TeamInklings")));
|
||||||
|
foreach (var dev in TeamInklings)
|
||||||
|
{
|
||||||
|
var guildMemberResult = await _guildApi.GetGuildMemberAsync(
|
||||||
|
guildId, dev.Id, ct);
|
||||||
|
var tag = guildMemberResult.IsSuccess
|
||||||
|
? $"<@{dev.Id}>"
|
||||||
|
: Markdown.Hyperlink($"@{dev.Username}", $"https://git.mctaylors.ru/{dev.Username}");
|
||||||
|
|
||||||
|
builder.Append(tag).Append(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
builder.AppendDoubleLine().AppendLine(Markdown.Bold(
|
||||||
|
Markdown.Hyperlink("TeamOctolings", "https://github.com/TeamOctolings")));
|
||||||
|
foreach (var dev in TeamOctolings)
|
||||||
{
|
{
|
||||||
var guildMemberResult = await _guildApi.GetGuildMemberAsync(
|
var guildMemberResult = await _guildApi.GetGuildMemberAsync(
|
||||||
guildId, dev.Id, ct);
|
guildId, dev.Id, ct);
|
||||||
|
@ -93,14 +111,14 @@ public class AboutCommandGroup : CommandGroup
|
||||||
? $"<@{dev.Id}>"
|
? $"<@{dev.Id}>"
|
||||||
: Markdown.Hyperlink($"@{dev.Username}", $"https://github.com/{dev.Username}");
|
: Markdown.Hyperlink($"@{dev.Username}", $"https://github.com/{dev.Username}");
|
||||||
|
|
||||||
builder.AppendBulletPointLine($"{tag} — {$"AboutDeveloper@{dev.Username}".Localized()}");
|
builder.Append(tag).Append(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
var embed = new EmbedBuilder()
|
var embed = new EmbedBuilder()
|
||||||
.WithSmallTitle(string.Format(Messages.AboutBot, bot.Username), bot)
|
.WithSmallTitle(string.Format(Messages.AboutBot, bot.Username), bot)
|
||||||
.WithDescription(builder.ToString())
|
.WithDescription(builder.ToString())
|
||||||
.WithColour(ColorsList.Cyan)
|
.WithColour(ColorsList.Cyan)
|
||||||
.WithImageUrl("https://raw.githubusercontent.com/TeamOctolings/Octobot/master/docs/octobot-banner.png")
|
.WithImageUrl("https://git.mctaylors.ru/TeamInklings/OctobotStealth/media/branch/HEAD/docs/octobot-banner.png")
|
||||||
.WithFooter(string.Format(Messages.Version, BuildInfo.Version))
|
.WithFooter(string.Format(Messages.Version, BuildInfo.Version))
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
@ -122,10 +140,10 @@ public class AboutCommandGroup : CommandGroup
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
BuildInfo.IsDirty
|
BuildInfo.IsDirty
|
||||||
? Messages.ButtonDirty
|
? Messages.ButtonDirty
|
||||||
: Messages.ButtonReportIssue,
|
: Messages.ButtonReportIssueDisabled,
|
||||||
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
||||||
URL: BuildInfo.IssuesUrl,
|
URL: BuildInfo.IssuesUrl,
|
||||||
IsDisabled: BuildInfo.IsDirty
|
IsDisabled: true
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _feedback.SendContextualEmbedResultAsync(embed,
|
return await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -72,10 +72,10 @@ public class ErrorLoggingPostExecutionEvent : IPostExecutionEvent
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
BuildInfo.IsDirty
|
BuildInfo.IsDirty
|
||||||
? Messages.ButtonDirty
|
? Messages.ButtonDirty
|
||||||
: Messages.ButtonReportIssue,
|
: Messages.ButtonReportIssueDisabled,
|
||||||
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
||||||
URL: BuildInfo.IssuesUrl,
|
URL: BuildInfo.IssuesUrl,
|
||||||
IsDisabled: BuildInfo.IsDirty
|
IsDisabled: true
|
||||||
);
|
);
|
||||||
|
|
||||||
return ResultExtensions.FromError(await _feedback.SendContextualEmbedResultAsync(embed,
|
return ResultExtensions.FromError(await _feedback.SendContextualEmbedResultAsync(embed,
|
||||||
|
|
|
@ -59,4 +59,18 @@ public static class StringBuilderExtensions
|
||||||
{
|
{
|
||||||
return builder.Append(" - ").AppendLine(value);
|
return builder.Append(" - ").AppendLine(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Appends the input string with two default line terminators
|
||||||
|
/// to the end of specified <see cref="StringBuilder" /> object.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="builder">The <see cref="StringBuilder" /> object.</param>
|
||||||
|
/// <param name="value">The string to append with two default line terminators.</param>
|
||||||
|
/// <returns>
|
||||||
|
/// The builder with the appended string with two default line terminators at the end.
|
||||||
|
/// </returns>
|
||||||
|
public static StringBuilder AppendDoubleLine(this StringBuilder builder, string? value = null)
|
||||||
|
{
|
||||||
|
return builder.AppendLine().AppendLine(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
26
src/Messages.Designer.cs
generated
26
src/Messages.Designer.cs
generated
|
@ -642,24 +642,6 @@ namespace Octobot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static string AboutDeveloper_mctaylors {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AboutDeveloper@mctaylors", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string AboutDeveloper_Octol1ttle {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AboutDeveloper@Octol1ttle", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string AboutDeveloper_neroduckale {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("AboutDeveloper@neroduckale", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal static string ReminderCreated {
|
internal static string ReminderCreated {
|
||||||
get {
|
get {
|
||||||
return ResourceManager.GetString("ReminderCreated", resourceCulture);
|
return ResourceManager.GetString("ReminderCreated", resourceCulture);
|
||||||
|
@ -1216,5 +1198,13 @@ namespace Octobot {
|
||||||
return ResourceManager.GetString("ButtonOpenWiki", resourceCulture);
|
return ResourceManager.GetString("ButtonOpenWiki", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static string ButtonReportIssueDisabled
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("ButtonReportIssueDisabled", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,10 +113,10 @@ public class GuildLoadedResponder : IResponder<IGuildCreate>
|
||||||
ButtonComponentStyle.Link,
|
ButtonComponentStyle.Link,
|
||||||
BuildInfo.IsDirty
|
BuildInfo.IsDirty
|
||||||
? Messages.ButtonDirty
|
? Messages.ButtonDirty
|
||||||
: Messages.ButtonReportIssue,
|
: Messages.ButtonReportIssueDisabled,
|
||||||
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
new PartialEmoji(Name: "\u26a0\ufe0f"), // 'WARNING SIGN' (U+26A0)
|
||||||
URL: BuildInfo.IssuesUrl,
|
URL: BuildInfo.IssuesUrl,
|
||||||
IsDisabled: BuildInfo.IsDirty
|
IsDisabled: true
|
||||||
);
|
);
|
||||||
|
|
||||||
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
return await _channelApi.CreateMessageWithEmbedResultAsync(channel, embedResult: errorEmbed,
|
||||||
|
|
Reference in a new issue