Commit graph

36 commits

Author SHA1 Message Date
Ethan Lane 13dd2558f2 Migrate to npm
Some checks failed
Deploy To Production / build (push) Successful in 37s
Deploy To Production / deploy (push) Failing after 14s
2024-04-28 16:19:16 +01:00
Ethan Lane f3d67bb33a Update bunny command to defer reply until it finds an image 2024-04-19 18:16:25 +01:00
Ethan Lane 2b04952d85 Update cache helper using the wrong symbol to measure interval
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-30 16:15:53 +00:00
Ethan Lane 5f054b02a5 Add cache helper to update user cache every 30 minutes
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-01 18:25:24 +00:00
Ethan Lane 56f0d105be Create button event to gain the server access role (#398)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Add the ability for button event interactions to be created
- Added a button event interaction which gives a user the role which is specified in the config `verification.role`
- Added a command to generate a button to activate the verify button event

#232

## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/398
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-01-26 20:59:05 +00:00
Ethan Lane 7c2870d28e Fix bug where a default config setting wouldn't show the key you were using (#388)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Fix bug where a default config setting wouldn't show the key you were using
- Fix bug where a config which doesn't exist wouldn't show the key you were using

#289

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

- This was tested by checking both a setting which is defaulted and not used, and both now show they key correctly

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/388
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-12-22 14:36:36 +00:00
Ethan Lane efb431ef3a Fix nickname change event not working (#385)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Fix the nickname changed event not working
    - This was due to the default value not being set because of a typo
- Update the client to allow partials for guild members

#353

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

- This has been tested locally by making sure the nickname change event fires when expected

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/385
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-12-16 16:50:26 +00:00
Ethan Lane af2da69843 Update message delete log embed to only show filenames (#366)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Update message delete log embed to only show file names
- Update the title of the attachments heading to show how many attachments it had

#322

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

- This has been tested by deleting messages with attachments and ensuring it logs as expected

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/366
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-11-10 18:21:27 +00:00
Ethan Lane 2d51b83d77 Fix invalid config value not showing properly (#336)
Some checks failed
continuous-integration/drone/push Build is failing
# Description

- Fix the invalid config value not showing properly
- When there is no server value or default value, it will show it as `<NONE>`

#315

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/336
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-09-29 18:00:29 +01:00
Ethan Lane 7613aedbbe Fix muted command not working (#335)
Some checks failed
continuous-integration/drone/push Build is failing
# Description

- Fix muted command not working
- This was caused by the muted role name still using old logic before per-server configuration

#316

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

- This was tested locally by running the mute and unmute commands, and seeing it the error no longer occurs

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/335
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-08-18 21:07:19 +01:00
Ethan Lane 1c4fdd05f1 Fix config get command not returning the right key value name (#334)
Some checks failed
continuous-integration/drone/push Build is failing
# Description

- Fixed the `/config get` command not returning the actual key's name, instead using a strinified "Object" property

#289

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

- This was tested by running the `/config get` command on my dev bot, and making sure it still gets the correct value for the key string

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provide my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/334
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-08-18 21:04:06 +01:00
Ethan Lane 2d48a6fde2 Fix moderation commands not sending log embed with user avatar (#328)
Some checks failed
continuous-integration/drone/push Build is failing
# Description

- Fixes the moderation commands not sending the log embed with the user avatar
- Updates the .env files to use v3.2

#205

## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

# How Has This Been Tested?

- This has been tested locally by running the warn command against a user, and seeing if the log uses my avatar in the thumbnail

# Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/328
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-08-11 20:52:16 +01:00
Ethan Lane 64649743e7 Add poll command 2023-07-14 16:10:39 +01:00
Vylpes 995564cb5b Deprecate mute and unmute commands (#314)
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
- Add a deprecation message to the mute and unmute commands

#252

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/314
2023-07-07 12:28:06 +01:00
Vylpes 400b4de304 feature/98-timeout-command-2 (#306)
Some checks failed
continuous-integration/drone/push Build is failing
- Prevent user from trying to time out a bot
- Update time length input to ignore commas

#98

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/306
2023-06-30 17:33:04 +01:00
Vylpes eb774aa280 Fix bot not replying to the interaction on warn (#312)
Some checks failed
continuous-integration/drone/push Build is failing
- Fix bot not replying to the interaction when warning a user

#301

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/312
2023-06-30 17:19:40 +01:00
Vylpes 4f2c186244 Create timeout command (#302)
Some checks failed
continuous-integration/drone/push Build is failing
- Create timeout command

#98

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/302
2023-06-16 18:01:45 +01:00
Vylpes e6c845e3b2 Switch to TypeORM's DataSource API (#299)
Some checks failed
continuous-integration/drone/push Build is failing
- Switch to TypeORM's DataSource API, rather than using the now deprecated ormconfig.json
- This will fix stage deployment not knowing how to deploy the database migrations

#297

> **NOTE:** This change requires the deployment scripts to be updated, please update them on the server before merging

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/299
2023-05-26 17:59:22 +01:00
Ethan Lane c12644d537 Fix build errors from merge
Some checks failed
continuous-integration/drone/push Build is failing
2023-05-08 18:37:51 +01:00
Ethan Lane efd213d085 Merge branch 'main' into develop 2023-05-08 18:33:23 +01:00
Vylpes 39999dfbba 3.0.7 (#295)
- Update dependency minimatch to 3.1.1
- Update dependency xml2js

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/295
Reviewed-by: VylpesTester <tester@vylpes.com>
2023-05-08 18:24:09 +01:00
Ethan Lane 27afb3dd22 Fix not having a link set in the config crashing the bot 2023-01-28 14:53:23 +00:00
Vylpes a3e062a1ff defect/214-application-did-not-respond (#233)
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/233
2022-12-27 15:18:55 +00:00
Vylpes 39967068bb Feature/155 lobby command list (#215)
- Add lobby list command to list all channels setup as a lobby for the current server as well as their last time used

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/215
Reviewed-by: VylpesTester <tester@vylpes.com>
2022-11-12 22:06:41 +00:00
Vylpes d688d292c3
Fix the event embeds not having the user's avatar on the thumbnail (#213) 2022-11-04 18:07:00 +00:00
Vylpes 0d63bd120d
Feature/103 improve events (#201)
* Improve event handler to only run events that have been registered

* Tidy up events into their own function files
2022-10-09 15:23:25 +01:00
Vylpes ed8f5927c8
Feature/81 slash command support (#192)
* Update discord.js

* Migrate to slash commands

* Clean up imports

* Update permissions

* Fix guild-specific commands not showing up

* Fix changes requested
2022-09-18 11:57:22 +01:00
Vylpes 7decd28dc9
Feature/182 setup actions (#186)
* Create scripts

* Create github workflows

* Create initial DB migration script

* Make default bot prefix configurable

* Add bot token fetcher
2022-09-06 19:24:40 +01:00
Vylpes cd666d24fd
Feature/vba 77 (#178)
* Add say command (#174)

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/174

* Add repo and funding link to about message (#176)

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/176

* Add other subreddits to bunny command (#177)

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/177

* Add database table

* Save moderation actions to database

* Add audit command to see a user's audits

* Add audit view subcommand

* Add audit clear subcommand

* Create add audit subcommand

* Fix bot crashing when viewing an audit with no reason

* Fix changes requested
2022-09-05 18:10:04 +01:00
Vylpes 2da5e1aa75
Feature/vba 52 (#175)
* Add say command (#174)

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/174

* Add repo and funding link to about message (#176)

Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/176

* Add other subreddits to bunny command

* Fix changes requested
2022-09-05 18:07:32 +01:00
Vylpes 4d01f0b34a
Pending changes exported from your codespace (#173) 2022-08-09 12:33:03 +01:00
Vylpes a01a43788e
Feature/49 ignore channel lists when logging (#168)
* Add entity

* Create ignore command

* Update message events to ignore channels set
2022-07-16 16:12:55 +01:00
Vylpes 1403619bda
Make bot check channel permissions before sending messages (#161) 2022-06-05 14:11:01 +01:00
Vylpes aa070bb7a7
v3.0.2 (#159)
* Change lobby command to error upon making a duplicate lobby channel (#154)

* Update lobby command to give proper errors if role or channel id cannot be found (#156)

* Add bunny command back (#157)

* 150 assignable roles should be its own table to prevent limitations on length (#158)

* Add entity

* Update role config command to use new entity

* Update role command to use new entity

* Remove legacy code from config command

* Update .env template to current date
2022-05-16 18:41:15 +01:00
Ethan Lane 31866b1c3b
Add ability to disable events 2022-04-24 15:32:29 +01:00
Vylpes 04a4a6204c
v3.0 (#145)
* Change rules.txt to rules.json (#31)

* Migrate to yarn

* Add role configs to config template

* Install packges and setup typescript

* Migrate entry point

* Migrate about command

* Migrate ban command

* Migrate clear command

* Migrate kick command

* Migrate mute command

* Migrate poll command

* Migrate bunny command

* Update required roles checker

* Migrate role command

* Migrate unmute command

* Migrate warn command

* Migrate eval command

* Migrate help command

* Migrate rules command

* Migrate events to typescript

* Update about command to use the PublicEmbed class

* Update ErrorMessage to ChannelNotFound

* Update messageDelete event to ignore bots

* Feature/74 merge vylbot core (#80)

* Merge VylBot-Core

* Update commands to new system

* Fix issue where events would not load

* Feature/12 create tests (#102)

* Fix tests

* Update coverage

* Remove unrequired mock files

* Add about command test

* Update about tests

* Ban command tests

* eval command tests

* Start help command tests

* Add help command tests

* Add kick command tests

* Mute command tests

* Poll command tests

* Add role command tests

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Add rules command tests

* Add unmute command tests

* Add warn command tests

* Add MemberEvents tests

* Add GuildMemberUpdate tests

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Add MessageEvents tests

* Add StringTools test

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Add embed tests

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Add GitHub Actions

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Move to tslint

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Remove tslint

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Remove linting script

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Update rules with blog website and event spoilers rule" (#106)

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Containerise bot (#107)

* Add moderator names to audit reason (#108)

* Feature/48 database (#114)

* Add database and default values

* Add ability to save a setting to the database

* Get commands and events to use database

* Setup and config command

* Update commands to check roles per server

* Different rules per server

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Different prefix per server

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Add verification system

Signed-off-by: Ethan Lane <ethan@vylpes.com>

* Disabled commands per server

* Add devmode for default prefix

* Update embeds

* Fix broken tests

* Feature/66 add different commands per server (#122)

* Add ability for server exclusive commands

* Add MankBot server-exclusive commands

* Add lobby entity to database

* Add documentation

* Add setup command for lobby (#123)

* Update bot to discord.js v13 (#125)

* Update bot to discord.js v13

* Remove debug code

* 110 commandshelp about command errors which causes command to not run (#126)

* Change onMessage to onMessageCreate

* Fix help command

* Add override for bot owner and server owner (#135)

* Change help command so exclusive commands can only be seen for the server they're assigned to (#136)

* Change parsing to not crash if invalid (#142)

* 137 role command cannot read properties of undefined (#141)

* Fix issue with bot crashing

* Fix server prefix not showing

* Add easy way to configure role command

* Move help text to its own directory

* Make role config command to use role id

* Get lobby command to use IDs instead of names (#144)

Co-authored-by: Vylpes <getgravitysoftware@gmail.com>
2022-04-24 14:46:37 +01:00