1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 09:09:00 +03:00
Commit graph

317 commits

Author SHA1 Message Date
d713b977f0
Synchronize roles only on member data updates (#130)
This PR makes it so that roles in MemberData are updated only in
MemberUpdateService. This reduces possible points of failures,
maintenance burden and reliance on gateway events
2023-09-30 20:36:55 +05:00
5d278883d5
Synchronize scheduled events on sch. events tick (#129)
Because the Discord API sucks at providing data when needed, this PR
makes it so that events are synchronized every tick instead of on
gateway events. This fixes an issue where the bot won't know about a
scheduled event if it was created before the bot was started
2023-09-30 20:25:22 +05:00
804bcd6e68
Rebrand to Octobot (#128)
We're moving!

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-30 18:58:32 +05:00
2e2f50908e
Add /random (#127)
It could have been a milestone PR, but of course I made a mistake
_somewhere_.

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-29 16:22:44 +00:00
04897cab20
Redesign embeds (#123)
TODO before merging:

- [x] /about
- [x] /ban
- [x] /unban
- [x] /kick
- [x] /mute
- [x] /unmute
- [x] /remind
- [x] /listremind
- [x] MessageEditedResponder
- [x] MessageDeletedResponder

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-29 18:36:16 +03:00
d5c4340210
Add some Splatoon™ songs that I liked (#125)
- Deep Cut - Big Betrayal —
[source](https://www.youtube.com/watch?v=BMy7gvl3bXE)
- Squid Sisters - Tommorrow's Nostalgia Today —
[source](https://www.youtube.com/watch?v=S8VYi2ODeF4)
- Deep Cut - Anarchy Rainbow —
[source](https://www.youtube.com/watch?v=DtMOAvOWTvY)
- Squid Sisters - Liquid Sunshine —
[source](https://www.youtube.com/watch?v=EZx61kSObTIg)
- Damp Socks feat. Off the Hook - Candy-Coated Rocks —
[source](https://youtube.com/watch?v=_-nyDSANZt4)
- H2Whoa - Aquasonic —
[source](https://www.youtube.com/watch?v=t2sNgpFgFC0)
- Yoko & the Gold Bazookas - Ska-Blam! —
[source](https://www.youtube.com/watch?v=9pHIwuTHcbc)

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-29 15:50:15 +03:00
0f916d46de
Add /showinfo (#122)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-29 15:31:45 +03:00
4e4e60f845
Fix mute role returning when rejoining server (#121)
Closes #117

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-28 14:26:58 +03:00
e907930623
Fix auto-unban and auto-unmute always triggering (#119)
Flipping `>` to `<=` changed null handling semantics within the
operator, causing the unban/unmute code to always run

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-28 00:07:46 +05:00
906bfd07e8
Skip refreshing roles if the member is role-muted (#118)
Closes #116
2023-09-27 18:27:28 +00:00
f2db7f016c
Fix UnknownMember warning flood (#115)
If a user was muted using the `MuteRole` method and then banned, the
UnknownMember warning will flood your logs when `DateTimeOffset.UtcNow >
data.MutedUntil` becomes true, because there is no user in the server to
unmute.

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-09-27 21:25:49 +03:00
1ab5a640a9
Set MemberData.BannedUntil to null in /unban (#114)
Please keep `MemberData` clean of unnecessary values.

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-09-27 12:47:43 +03:00
3a3865ba3d
Add /resetsettings (#111)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-22 20:23:08 +03:00
d6e1468f3e
Disable the logging of SaveAsync due to spam in the logs (#113)
Closes #112

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-22 20:09:22 +03:00
81099fad4c
Move all GuildData to one folder (#110)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-22 15:33:14 +03:00
1e8b7e5373
Add mute role support & fix /unmute (#109)
- Added support for `MuteRole`, now if you add any role to this setting,
then try to mute a member, all his roles will be removed except for the
one you set in this setting.
- Fixed `/unmute`, that tried to set target's display name to unmute
reason.

---------

Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-21 20:16:09 +03:00
b796b885a1
Change logo CDN (#108)
Signed-off-by: Macintosh II <mctaylxrs@outlook.com>
2023-09-19 06:23:02 +05:00
1225ff83d4
Add MORE music to the bot (#107)
Music added:
- EDWXRDX - CONSCIENCE (2:16)
- dontleaveme - afterward (2:29)
- Clams Casino - I'm God (4:37)
- Jupyter - Starboy (2:35)
- VØJ, Narvent - Memory Reboot (3:29)

Timecode source: [Yandex.Music](https://music.yandex.ru)

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-09-18 16:24:55 +05:00
438ecfb41b
Force enumeration of global collections before using them (#106)
This PR closes #105 

This PR fixes exceptions caused by changing a collection's contents
while it is being enumerated. This can often happen with Guild- and
MemberDatas. By using `ToArray()` on these global collections and using
it in the `foreach` loop, we create a new copy of the collection,
preventing any modification to it.

While this does introduce a lot of memory allocations, there is no
fixing that. Usually, the fix to these exceptions would be to convert
the `foreach` to a reverse-`for`. However, because indices cannot be
used on these collections, that is not possible.

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-12 16:28:46 +03:00
dependabot[bot]
81595e58d3
Bump actions/checkout from 3 to 4 (#104)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to
4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
<h2>v3.5.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Checkout Issue in self hosted runner due to faulty submodule
check-ins by <a
href="https://github.com/megamanics"><code>@​megamanics</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li>Fix typos found by codespell by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li>Add support for sparse checkouts by <a
href="https://github.com/dscho"><code>@​dscho</code></a> and <a
href="https://github.com/dfdez"><code>@​dfdez</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
<li>Release v3.5.3 by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/megamanics"><code>@​megamanics</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li><a href="https://github.com/dfdez"><code>@​dfdez</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p>
<h2>v3.5.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Use correct API url / endpoint in GHES by <a
href="https://github.com/fhammerl"><code>@​fhammerl</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a>
based on <a
href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a>
by <a href="https://github.com/1newsr"><code>@​1newsr</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p>
<h2>v3.5.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve checkout performance on Windows runners by upgrading
<code>@​actions/github</code> dependency by <a
href="https://github.com/BrettDong"><code>@​BrettDong</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/BrettDong"><code>@​BrettDong</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v4.0.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1067">Support
fetching without the --progress option</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1436">Update to
node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark
test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add
option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
<h2>v3.5.3</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1196">Fix:
Checkout fail in self-hosted runners when faulty submodule are
checked-in</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix
typos found by codespell</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add
support for sparse checkouts</a></li>
</ul>
<h2>v3.5.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix
api endpoint for GHES</a></li>
</ul>
<h2>v3.5.1</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix
slow checkout on Windows</a></li>
</ul>
<h2>v3.5.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add
new public key for known_hosts</a></li>
</ul>
<h2>v3.4.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade
codeql actions to v2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade
dependencies</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade
<code>@​actions/io</code></a></li>
</ul>
<h2>v3.3.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1045">Implement
branch list using callbacks from exec function</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1050">Add
in explicit reference to private checkout options</a></li>
<li>[Fix comment typos (that got added in <a
href="https://redirect.github.com/actions/checkout/issues/770">#770</a>)](<a
href="https://redirect.github.com/actions/checkout/pull/1057">actions/checkout#1057</a>)</li>
</ul>
<h2>v3.2.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/942">Add
GitHub Action to perform release</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/967">Fix
status badge</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1002">Replace
datadog/squid with ubuntu/squid Docker image</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/964">Wrap
pipeline commands for submoduleForeach in quotes</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1029">Update
<code>@​actions/io</code> to 1.1.2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1039">Upgrading
version to 3.2.0</a></li>
</ul>
<h2>v3.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/770">Add
input <code>set-safe-directory</code></a></li>
</ul>
<h2>v3.0.1</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3df4ab11eb"><code>3df4ab1</code></a>
Release 4.0.0 (<a
href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li>
<li><a
href="8b5e8b7687"><code>8b5e8b7</code></a>
Support fetching without the --progress option (<a
href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li>
<li><a
href="97a652b800"><code>97a652b</code></a>
Update default runtime to node20 (<a
href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 14:20:03 +03:00
dependabot[bot]
f0a449d26c
Bump muno92/resharper_inspectcode from 1.8.2 to 1.8.3 (#103)
Bumps
[muno92/resharper_inspectcode](https://github.com/muno92/resharper_inspectcode)
from 1.8.2 to 1.8.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/muno92/resharper_inspectcode/releases">muno92/resharper_inspectcode's
releases</a>.</em></p>
<blockquote>
<h2>1.8.3</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<ul>
<li>Update dependency <code>@​vercel/ncc</code> to ^0.38.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/muno92/resharper_inspectcode/pull/413">muno92/resharper_inspectcode#413</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/muno92/resharper_inspectcode/compare/1.8.2...1.8.3">https://github.com/muno92/resharper_inspectcode/compare/1.8.2...1.8.3</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/muno92/resharper_inspectcode/blob/main/CHANGELOG.md">muno92/resharper_inspectcode's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/muno92/resharper_inspectcode/compare/1.8.2...1.8.3">1.8.3</a>
- 2023-09-07</h2>
<ul>
<li>Update dependency <code>@​vercel/ncc</code> to ^0.38.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/muno92/resharper_inspectcode/pull/413">muno92/resharper_inspectcode#413</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="35b207efcd"><code>35b207e</code></a>
Merge pull request <a
href="https://redirect.github.com/muno92/resharper_inspectcode/issues/414">#414</a>
from muno92/tagpr-from-1.8.2</li>
<li><a
href="67310c480b"><code>67310c4</code></a>
Compile</li>
<li><a
href="27edfc64f3"><code>27edfc6</code></a>
[tagpr] update CHANGELOG.md</li>
<li><a
href="aa84292660"><code>aa84292</code></a>
[tagpr] prepare for the next release</li>
<li><a
href="e3bdd8b144"><code>e3bdd8b</code></a>
Merge pull request <a
href="https://redirect.github.com/muno92/resharper_inspectcode/issues/413">#413</a>
from muno92/renovate/all-minor-patch</li>
<li><a
href="9b9a73fe3c"><code>9b9a73f</code></a>
Update dependency <code>@​vercel/ncc</code> to ^0.38.0</li>
<li>See full diff in <a
href="https://github.com/muno92/resharper_inspectcode/compare/1.8.2...1.8.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=muno92/resharper_inspectcode&package-manager=github_actions&previous-version=1.8.2&new-version=1.8.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 14:18:03 +03:00
4ccf40bf35
Allow better customisation of autodeploy through secrets and variables (#102)
The production environment and host are ready for this PR

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-09-04 20:59:30 +03:00
dependabot[bot]
5fd116d0e2
Bump muno92/resharper_inspectcode from 1.8.0 to 1.8.2 (#101) 2023-09-04 11:35:49 +05:00
31968837e5
Fix JSON corruption when saving (#100)
This PR fixes an issue that caused guild data JSON files to be corrupted
upon saving. As it turns out `File.OpenWrite(string)` does not clear the
file before writing to it. That means, if a file contains `{"MyKey":
"MyValue"}` and I write `{}` to it using `File.OpenWrite(string)`, the
contents of the file will be `{}MyKey": "MyValue"}`. This is a malformed
JSON and will cause an error upon next bot startup.

In addition, this PR blacklists the `File.OpenWrite` method using
`CodeAnalysis/BannedSymbols.txt` to prevent its accidental use in the
future.

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-22 07:46:57 +00:00
5831f5205c
Add autocomplete for /editsettings setting keys (#98)
This PR adds autocomplete for setting keys in `/editsetting` slash
command. The usage of options provided by auto-complete is enforced
client-side.

Closes #97
Closes #95

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-22 07:45:46 +00:00
37ebf0ffa0
Add periodic guild data saving (every 5 minutes) (#99)
This PR adds a BackgroundGuildDataSaverService which will save all guild
data to disk every 5 minutes using a PeriodicTimer.

Closes #96

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-22 07:44:05 +00:00
324f455404
Rename settings commands (#94)
This PR renames commands `/settingslist` and `/settings` to
`/listsettings` and `/editsettings` respectively. This helps avoid
confusion and accidental use of the wrong command while conforming to a
common naming style, similar to remind commands.

cc @mctaylors wiki needs updating

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-22 02:18:58 +03:00
5937fae552
Change organization name references from TeamOctolings to LabsDevelopment (#93)
we are moving!

(6 commits because I was too lazy to open the IDE)

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-08-20 20:27:16 +00:00
0bf61ecf39
Add a JSON deserialization constructor for ScheduledEventData (#92)
This PR fixes an exception that would occur when deserialization of
ScheduledEventData would be attempted. The exception is fixed by
providing a constructor containing all properties and adding the
`[JsonConstructor]` attribute.

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-15 05:23:58 +00:00
ef5410b7bb
Update README.md due to #90 (#91)
completely forgot about README.md while i was reviewing #90

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-08-14 16:39:03 +00:00
4252613dd3
Fix various issues with ScheduledEventUpdateService (#89)
This PR closes #85.

This PR fixes many issues related to scheduled events. Most importantly,
scheduled events that are no longer present in the guild, but still have
data related to them, won't be left rotting.

This requires deletion of `ScheduledEvents.json` files in all guilds.
Maybe I'll start writing datafixers one day...

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-14 13:24:22 +00:00
501c51b865
Add automatic deployment (#90)
This PR closes #87.

This PR splits the workflow into 2 files: `build-pr.yml` and
`build-push.yml`.
The former runs InspectCode to make sure issues don't get through, while
the latter builds and uploads Boyfriend and publishes it to a remote
production server via SSH.

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-14 13:24:20 +00:00
da2a88246c
Add failed embed for /listremind (#88)
Without this embed, if there are no reminders created by the user, the
bot will endlessly think because StringBuilder will be empty and normal
embed will not be shown.
2023-08-14 07:45:56 +00:00
87dbb07dec
EventEarlyNotification timestamp bugfix and other changes (#84)
This PR fixes EventEarlyNotification timestamp not displaying correctly
and also has some other changes:
- Add xmldocs for `/settingslist`'s `page` option in
SettingsCommandGroup.cs
- Add option description for `index` for `/delreminder`
- Some corrections of grammatical errors in Messages.tt-ru.resx
- Fix `ArgumentOutOfRangeException` in `/settingslist` that appears if
the user uses a negative integer in `page`

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-12 20:19:07 +00:00
d0d663d2bb
Fix a crash in scheduled event early notification (#83)
This PR fixes a fatal crash that occurs when the bot tries to send an
early notification for a scheduled event. An exception is thrown by
`string#Format` when the argument list provided doesn't match the
argument list in the template. This is fixed by correcting the template
and the argument list

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-12 14:18:30 +00:00
488a1eec0c
Add /listremind and /delremind (#82)
This PR closes #61.

This PR adds the `/listremind` command and the `/delremind` command. The
`/delremind` command requires an index to determine which reminder to
delete.

cc @mctaylors review embed design and feature experience

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-12 13:54:51 +00:00
cac3ee9bf7
Scheduled event update bugfixes (#81)
This PR fixes the following bugs in ScheduledEventUpdateService:
- When a scheduled event is first added into ScheduledEventData, its
status update code will be skipped. This results in some messages not
being sent to the EventNotificationChannel
- When the status update code returns an unsuccessful Result, the status
in ScheduledEventData will still be updated, meaning that the code will
not retry.

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-12 13:47:14 +00:00
f260681b39
Split GuildUpdateService into separate services (#80)
GuildUpdateService is a service that contains way too many
responsibilities with everything strictly coupled to each other. The
code is buggy, hard to refactor and swallows errors. This prompted me to
make this PR, which splits it into three independant services:
- SongUpdateService (responsible for changing songs presence);
- MemberUpdateService (responsible for updating member datas: unbanning
users, adding the default role, sending reminders, filtering nicknames);
- ScheduledEventUpdateService (responsible for updating scheduled
events: sending notifications, automatically starting events).

All of these services and their methods use Results to push errors all
the way up in the stack, making sure no error is missed. To make logging
and debugging easier, an extension method for `ILogger` was created -
`LogResult`. The method checks if the result was successful or if its
failure was caused by a user or environment error before logging
anything - providing cleaner code and logs. `ExceptionError`s will also
have their exception stacktrace and type logged (except in Remora code).

This PR also fixes an issue that prevented banned users from being
unbanned when their punishment was over.

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-05 18:02:40 +00:00
e9f7825e4a
Backfill member data when a guild is loaded or a new member joins it (#77)
This PR backfills member data when a guild is loaded or a new member
joins it. The reason for that is some actions that happen on member tick
(default role grant, nickname filtering) would only occur if a member
had data related to them (due to being banned or setting a reminder). In
addition, the `.editorconfig` was updated with new inspections provided
by a new release of Rider, 2023.2
See explanations for some changes in comments.

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-04 13:52:54 +00:00
d023033ed4
Fix roles not returning on rejoin if welcome messages were disabled (#78)
This PR fixes an issue where, if the `PublicFeedbackChannel` wasn't set
or the welcome message was disabled, `GuildMemberJoinedResponder` would
`return` early, causing roles to not be granted back if
`ReturnRolesOnRejoin` was enabled, by moving the `if return` after the
code that grants back roles

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-03 20:34:01 +00:00
c9a7fb79ab
Log guild setting changes to PrivateFeedbackChannel (#79)
This PR makes the bot log guild settings to the Private Feedback
Channel. The functionality was present in pre-Remora Boyfriend, but was
missing afterwards, so I will call this a bug, making this PR a bugfix.

cc @mctaylors - embed design needs review

![image](https://github.com/TeamOctolings/Boyfriend/assets/61277953/5680f0d6-82fc-4c0e-b4f0-815b082997ec)

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-03 20:32:38 +00:00
84e730838b
Add a new .editorconfig and reformat code (#76)
*I'll start working on features and bugfixes after this PR, I promise*
very short summary:
- no more braceless statements
- braces are on new lines now
- `sealed` on everything that can be `sealed`
- no more awkwardly looking alignment of fields/parameters
- no more `Service` suffix on service fields. yeah.
- no more `else`s. who needs them?
- code style is now enforced by CI

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-02 20:51:16 +00:00
4cb39a34b5
Add logging to file (#75)
This PR adds the package `Serilog.Extensions.Logging.File` to add
logging to file. I decided this was necessary after the bot unexpectedly
went down in a tmux session, leaving no traces behind.


![image](https://github.com/TeamOctolings/Boyfriend/assets/61277953/b6ff9e69-b370-4844-b552-db4a39933f62)

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-08-02 13:25:41 +00:00
940f2e64a0
Add soundtracks from different games (#74)
This PR adds some soundtracks from five different games to the bot's
listening activity.

List of soundtracks added:
- Jukio Kallio, Daniel Hagström - Fall 'n' Roll (Fall Guys)
- SCATTLE - Hypertension (Super Meat Boy)
- KEYGEN CHURCH - Tenebre Rosso Sangue (ULTRAKILL)
- Chipzel - Swing Me Another 6 (Dicey Dungeons)
- ~Floex - The Glasshouse With Butterfly (Machinarium)~
- Noisecream - Mist of Rage (My Friend Pedro)
2023-07-30 09:29:08 +00:00
f47ebe81c5
Do not wrap result errors when returning them (#73)
This PR removes the wrapping of in-house created result errors with
`Result.FromError` (I did not know this was possible until today, lol),
which reduces code verbosity and makes it easier to read, and replaces
`ArgumentNullError` with `ArgumentInvalidError` when retrieving IDs from
a command context, which, in my opinion, is more correct.

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-28 16:58:55 +00:00
a6df26af67
Resolving issues on #65 (#72)
Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-07-26 18:07:05 +00:00
8f95e4cd2c
Replace "ToLower" with "ToLowerInvariant" to fix a missed warning (#71) 2023-07-25 16:20:09 +00:00
05fd343dce
Improved /settingslist + fixed /settings pt.1 (#65)
This PR is mainly aimed at improving /settingslist and fixing /settings

List of things to do before merging:
- [x] #62
- [x] Add the pages feature to /settingslist
- [x] Add bullets like these ->
![](https://github.com/TeamOctolings/Boyfriend/assets/95250141/fdf1a3b8-bb64-473d-9f57-bc6e34812811)

And since the development has already been taking more than 2 days, I
suggest splitting the PR into 2 parts.

List of other things that will be in the future PR:
- mctaylors#1
- Fix bot not answering when an invalid setting is specified in
/settings
- Options list for /settings

---------

Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com>
2023-07-25 19:53:11 +05:00
397bb83ba8
Add code analysis to prohibit using bad methods and properties (#70)
This PR adds the package `Microsoft.CodeAnalysis.BannedApiAnalyzers` to
scan for banned code (defined by `CodeAnalysis/BannedSymbols.txt`) and
provide warnings if it is used. The list of banned symbols is borrowed
from osu! and other projects

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-24 20:35:45 +03:00
7b722a45cb
Rename users who attempt to hoist themselves (#53)
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
Signed-off-by: mctaylors <95250141+mctaylors@users.noreply.github.com>
Co-authored-by: nrdk <neroduck@vk.com>
Co-authored-by: Octol1ttle <l1ttleofficial@outlook.com>
2023-07-24 19:51:05 +03:00