mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2024-10-02 12:09:07 +00:00
docs: Updated more links to point to new repo url
dev: Fixed project id as nadeko is moved to nadeko/nadekobot
This commit is contained in:
parent
d30fa44f3c
commit
6caea8e9e7
6 changed files with 68 additions and 53 deletions
|
@ -78,7 +78,7 @@ build:
|
|||
# - if: $CI_COMMIT_TAG
|
||||
# script:
|
||||
# - |
|
||||
# release-cli create --name "NadekoBot v$CI_COMMIT_TAG" --description "## [Changelog](https://gitlab.com/Kwoth/nadekobot/-/blob/v4/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \
|
||||
# release-cli create --name "NadekoBot v$CI_COMMIT_TAG" --description "## [Changelog](https://gitlab.com/nadeko/nadekobot/-/blob/v5/CHANGELOG.md#$(echo "$CI_COMMIT_TAG" | sed "s/\.//g")-$(date +%d%m%Y))" --tag-name $CI_COMMIT_TAG \
|
||||
# --assets-link "{\"name\":\"${LINUX_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_X64_RELEASE}\"}" \
|
||||
# --assets-link "{\"name\":\"${LINUX_ARM64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${LINUX_ARM64_RELEASE}\"}" \
|
||||
# --assets-link "{\"name\":\"${WIN_X64_RELEASE}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${WIN_X64_RELEASE}\"}" \
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
[![nadeko2](https://cdn.nadeko.bot/tutorial/docs-bot.png)](https://nadeko.bot/commands)
|
||||
|
||||
### Useful links
|
||||
- [Self hosting Guides and Docs](https://nadekobot.readthedocs.io/en/v4)
|
||||
- [Self hosting Guides and Docs](https://nadekobot.readthedocs.io/en/latest)
|
||||
- [Discord support server](https://discord.nadeko.bot)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# How to contribute
|
||||
|
||||
1. Make Merge Requests to the [**v4 branch**](https://gitlab.com/nadeko/nadekobot/tree/v5)
|
||||
1. Make Merge Requests to the [**v5 branch**](https://gitlab.com/nadeko/nadekobot/tree/v5)
|
||||
2. Keep a single Merge Request to a single feature
|
||||
3. Fill out the MR template
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
site_name: 'NadekoBot'
|
||||
site_url: 'https://nadeko.bot'
|
||||
repo_url: 'https://gitlab.com/kwoth/nadekobot'
|
||||
repo_url: 'https://gitlab.com/nadeko/nadekobot'
|
||||
site_author: 'Kwoth'
|
||||
|
||||
theme:
|
||||
|
|
|
@ -1,9 +1,15 @@
|
|||
using System.Net.Http.Json;
|
||||
using System.Text;
|
||||
using NadekoBot.Common.ModuleBehaviors;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NadekoBot.Modules.Administration.Self;
|
||||
|
||||
public sealed class GitlabReleaseModel
|
||||
{
|
||||
[JsonPropertyName("tag_name")]
|
||||
public required string TagName { get; init; }
|
||||
}
|
||||
public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
||||
{
|
||||
private readonly BotConfigService _bcs;
|
||||
|
@ -12,8 +18,15 @@ public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
|||
private readonly DiscordSocketClient _client;
|
||||
private readonly IMessageSenderService _sender;
|
||||
|
||||
public CheckForUpdatesService(BotConfigService bcs, IBotCredsProvider bcp, IHttpClientFactory httpFactory,
|
||||
DiscordSocketClient client, IMessageSenderService sender)
|
||||
|
||||
private const string RELEASES_URL = "https://gitlab.com/api/v4/projects/57687445/releases";
|
||||
|
||||
public CheckForUpdatesService(
|
||||
BotConfigService bcs,
|
||||
IBotCredsProvider bcp,
|
||||
IHttpClientFactory httpFactory,
|
||||
DiscordSocketClient client,
|
||||
IMessageSenderService sender)
|
||||
{
|
||||
_bcs = bcs;
|
||||
_bcp = bcp;
|
||||
|
@ -37,14 +50,14 @@ public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
|||
|
||||
try
|
||||
{
|
||||
const string URL = "https://cdn.nadeko.bot/cmds/versions.json";
|
||||
using var http = _httpFactory.CreateClient();
|
||||
var versions = await http.GetFromJsonAsync<string[]>(URL);
|
||||
var gitlabRelease = (await http.GetFromJsonAsync<GitlabReleaseModel[]>(RELEASES_URL))
|
||||
?.FirstOrDefault();
|
||||
|
||||
if (versions is null)
|
||||
if (gitlabRelease?.TagName is null)
|
||||
continue;
|
||||
|
||||
var latest = versions[0];
|
||||
var latest = gitlabRelease.TagName;
|
||||
var latestVersion = Version.Parse(latest);
|
||||
var lastKnownVersion = GetLastKnownVersion();
|
||||
|
||||
|
@ -59,7 +72,7 @@ public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
|||
UpdateLastKnownVersion(latestVersion);
|
||||
|
||||
// pull changelog
|
||||
var changelog = await http.GetStringAsync("https://gitlab.com/Kwoth/nadekobot/-/raw/v4/CHANGELOG.md");
|
||||
var changelog = await http.GetStringAsync("https://gitlab.com/nadeko/nadekobot/-/raw/v5/CHANGELOG.md");
|
||||
|
||||
var thisVersionChangelog = GetVersionChangelog(latestVersion, changelog);
|
||||
|
||||
|
@ -80,14 +93,16 @@ public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
|||
|
||||
var eb = _sender.CreateEmbed()
|
||||
.WithOkColor()
|
||||
.WithAuthor($"NadekoBot v{latestVersion} Released!")
|
||||
.WithAuthor($"NadekoBot v{latest} Released!")
|
||||
.WithTitle("Changelog")
|
||||
.WithUrl("https://gitlab.com/Kwoth/nadekobot/-/blob/v4/CHANGELOG.md")
|
||||
.WithUrl("https://gitlab.com/nadeko/nadekobot/-/blob/v5/CHANGELOG.md")
|
||||
.WithDescription(thisVersionChangelog.TrimTo(4096))
|
||||
.WithFooter("You may disable these messages by typing '.conf bot checkforupdates false'");
|
||||
.WithFooter(
|
||||
"You may disable these messages by typing '.conf bot checkforupdates false'");
|
||||
|
||||
await _sender.Response(user).Embed(eb).SendAsync();
|
||||
}).WhenAll();
|
||||
})
|
||||
.WhenAll();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -136,6 +151,7 @@ public sealed class CheckForUpdatesService : INService, IReadyExecutor
|
|||
}
|
||||
|
||||
private const string LAST_KNOWN_VERSION_PATH = "data/last_known_version.txt";
|
||||
|
||||
private Version? GetLastKnownVersion()
|
||||
{
|
||||
if (!File.Exists(LAST_KNOWN_VERSION_PATH))
|
||||
|
|
|
@ -519,7 +519,7 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
=> smc.RespondConfirmAsync(_sender,
|
||||
"""
|
||||
- In case you don't want or cannot Donate to NadekoBot project, but you
|
||||
- NadekoBot is a completely free and fully [open source](https://gitlab.com/kwoth/nadekobot) project which means you can run your own "selfhosted" instance on your computer or server for free.
|
||||
- NadekoBot is a free and [open source](https://gitlab.com/nadeko/nadekobot) project which means you can run your own "selfhosted" instance on your computer.
|
||||
|
||||
*Keep in mind that running the bot on your computer means that the bot will be offline when you turn off your computer*
|
||||
|
||||
|
@ -532,7 +532,6 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
[OnlyPublicBot]
|
||||
public async Task Donate()
|
||||
{
|
||||
// => new NadekoInteractionData(new Emoji("🖥️"), "donate:selfhosting", "Selfhosting");
|
||||
var selfhostInter = _inter.Create(ctx.User.Id,
|
||||
new SimpleInteraction<object>(new ButtonBuilder(
|
||||
emote: new Emoji("🖥️"),
|
||||
|
@ -545,10 +544,12 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
.WithTitle("Thank you for considering to donate to the NadekoBot project!");
|
||||
|
||||
eb
|
||||
.WithDescription("NadekoBot relies on donations to keep the servers, services and APIs running.\n"
|
||||
+ "Donating will give you access to some exclusive features. You can read about them on the [patreon page](https://patreon.com/join/nadekobot)")
|
||||
.WithDescription("""
|
||||
NadekoBot relies on donations to keep the servers, services and APIs running.
|
||||
Donating will give you access to some exclusive features. You can read about them on the [patreon page](https://patreon.com/join/nadekobot)
|
||||
""")
|
||||
.AddField("Donation Instructions",
|
||||
$@"
|
||||
$"""
|
||||
🗒️ Before pledging it is recommended to open your DMs as Nadeko will send you a welcome message with instructions after you pledge has been processed and confirmed.
|
||||
|
||||
**Step 1:** ❤️ Pledge on Patreon ❤️
|
||||
|
@ -561,17 +562,15 @@ public sealed class Help : NadekoModule<HelpService>
|
|||
`1.` Go to your profile settings on Patreon and connect your Discord account to it.
|
||||
*please make sure you're logged into the correct Discord account*
|
||||
|
||||
If you do not know how to do it, you may follow instructions in this link:
|
||||
<https://support.patreon.com/hc/en-us/articles/212052266-How-do-I-connect-Discord-to-Patreon-Patron->
|
||||
If you do not know how to do it, you may [follow instructions here](https://support.patreon.com/hc/en-us/articles/212052266-How-do-I-connect-Discord-to-Patreon-Patron-)
|
||||
|
||||
**Step 3** ⏰ Wait a short while (usually 1-3 minutes) ⏰
|
||||
|
||||
Nadeko will DM you the welcome instructions, and you may start using the patron-only commands and features!
|
||||
Nadeko will DM you the welcome instructions, and you may will receive your rewards!
|
||||
🎉 **Enjoy!** 🎉
|
||||
")
|
||||
""")
|
||||
.AddField("Troubleshooting",
|
||||
"""
|
||||
|
||||
*In case you didn't receive the rewards within 5 minutes:*
|
||||
`1.` Make sure your DMs are open to everyone. Maybe your pledge was processed successfully but the bot was unable to DM you. Use the `.patron` command to check your status.
|
||||
`2.` Make sure you've connected the CORRECT Discord account. Quite often users log in to different Discord accounts in their browser. You may also try disconnecting and reconnecting your account.
|
||||
|
|
Loading…
Reference in a new issue