mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-12-27 00:05:39 -05:00
Add modifyUser function to modify the user's messages
This commit is contained in:
parent
13be00acd3
commit
0b9d3b89a7
@ -56,6 +56,10 @@ export class UserLevelsSvc {
|
||||
async deleteUser(userId:string) {
|
||||
return await this.model.destroy({where: {id: userId}});
|
||||
}
|
||||
async modifyUser(userId:string, updatedMessages:number) {
|
||||
await this.model.update({messages: updatedMessages}, {where: {id: userId}});
|
||||
return (await this.model.findByPk(userId)).dataValues;
|
||||
}
|
||||
async messageIncremental(userId:string) {
|
||||
const data = await this.model.findByPk(userId);
|
||||
if (data) {
|
||||
|
Loading…
Reference in New Issue
Block a user