Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#9) added warn function #25

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

(#9) added warn function #25

wants to merge 4 commits into from

Conversation

mkevenaar
Copy link
Owner

Basically this is transferred from Klara, but with the changes
applied to this bot adviced by David.

Warn a user

Fixes #9

Motivation and Context

New functionality

How Has This Been Tested?

Tested in the development channel

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mkevenaar mkevenaar requested a review from Lucxjo May 3, 2022 18:16
@mkevenaar mkevenaar self-assigned this May 3, 2022
@mkevenaar mkevenaar requested a review from davidzwa May 3, 2022 18:25
return;
}

let data = await userService.fetchUser(interaction.user.id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data is referring to src/database/user.service.js and the idea in Klara was to have a reputation system that would follow all servers with the bot, getting negative reputation on warns and positive on reactions on messages. A positive warn value should be added to src/database/guild.service.js and a reason

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A guild id should be added indeed, Nick should not transfer reputation over to another server.

import { SlashCommandBuilder } from '@discordjs/builders';
import { MessageEmbed, Permissions } from 'discord.js';

export const data = new SlashCommandBuilder()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have an option for warn reasons

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add that!

@mkevenaar mkevenaar removed their assignment May 4, 2022
@mkevenaar mkevenaar marked this pull request as draft May 4, 2022 19:40
@codecov
Copy link

codecov bot commented May 4, 2022

Codecov Report

Merging #25 (71d241d) into develop (4339315) will increase coverage by 0.09%.
The diff coverage is 7.40%.

❗ Current head 71d241d differs from pull request most recent head 7a9d312. Consider uploading reports for the commit 7a9d312 to get more accurate results

@@            Coverage Diff             @@
##           develop     #25      +/-   ##
==========================================
+ Coverage     5.66%   5.75%   +0.09%     
==========================================
  Files           20      24       +4     
  Lines          477     504      +27     
  Branches        76      80       +4     
==========================================
+ Hits            27      29       +2     
- Misses         395     417      +22     
- Partials        55      58       +3     
Impacted Files Coverage Δ
src/bot.js 17.14% <ø> (ø)
src/commands/admin/warn.js 0.00% <0.00%> (ø)
src/database/models/reason.js 0.00% <0.00%> (ø)
src/database/user.service.js 0.00% <0.00%> (ø)
src/database/models/user.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4339315...7a9d312. Read the comment docs.

mkevenaar and others added 4 commits July 28, 2024 19:27
Basically this is transferred from Klara, but with the changes
applied to this bot adviced by David.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Basic moderation - warn
3 participants