Skip to content

Commit

Permalink
Update to kazagumo@v3
Browse files Browse the repository at this point in the history
  • Loading branch information
RainyXeon committed Jan 7, 2024
1 parent 9b35fbb commit 468f762
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kazagumo-filter",
"version": "1.0.2",
"version": "2.0.0",
"description": "A plugin that allows you to set filter faster in Kazagumo",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"axios": "^1.1.3",
"discord.js": "^14.13.0",
"kazagumo": "^2.2.3"
"discord.js": "^14.14.1",
"kazagumo": "^3.0.0"
}
}
11 changes: 6 additions & 5 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import {
KazagumoError,
Kazagumo,
} from 'kazagumo';
import axios from "axios"
import data from "./data"
import { FilterRoot } from "./type"

export class NewPlayer extends OldPlayer {
public async filter(type: string) {
const filterData = data[type as keyof FilterRoot]
if (!filterData) throw new KazagumoError(404, "Filter not found")
await this["send"]({
op: 'filters',

await this.shoukaku.node.rest.updatePlayer({
guildId: this.guildId,
...filterData,
});
playerOptions: {
filters: filterData
}
})
}
}

Expand Down

0 comments on commit 468f762

Please sign in to comment.