Skip to content

Commit

Permalink
feat(twitch): Add notification change [adroidea/bot#75]
Browse files Browse the repository at this point in the history
  • Loading branch information
adan-ea committed Jan 26, 2024
1 parent 04e059a commit 45b1980
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adroi.d.ea",
"description": "Types for the discord bot of the same name: Adroid_ea.",
"version": "1.0.8",
"version": "1.0.9",
"author": "adan-ea",
"license": "AGPL-3.0",
"repository": {
Expand All @@ -27,7 +27,9 @@
],
"scripts": {
"build": "tsc",
"test": "jest --passWithNoTests"
"watch": "tsc -w",
"test": "jest --passWithNoTests",
"publish": "node .github/publish.js"
},
"devDependencies": {
"@types/jest": "^29.5.11",
Expand Down
21 changes: 19 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,18 @@ export interface ITMAlerts {
streamerName: string; // The name of the streamer
infoLiveChannel: string; // The channel where the bot will send the message when the streamer is live
pingedRole: string; // The role that will be pinged when the streamer is live
notifyChange: boolean; // If the bot should notify when the streamer change their game
ignoredCategories: string[]; // The list of categories that the bot should ignore
message: {
// The messages that the bot will send
streamStart: string[];
gameChange: string[];
};
}

export interface ITMAutoRoles {
enabled: boolean;
streamingRoleId: string; // The role that will be given to the streamer when he is streaming
streamingRoleId: string; // The role that will be given to the streamer when they are streaming
streamers: ITMStreamersData[]; // The list of streamers
}

Expand Down Expand Up @@ -249,7 +256,17 @@ export function createGuildObject(guild: any): IGuild {
liveProfilePicture: '',
streamerName: 'adan_ea',
infoLiveChannel: '',
pingedRole: ''
pingedRole: '',
notifyChange: false,
ignoredCategories: [],
message: {
streamStart: [
"{role}, **{streamer.name}** est en live ! C'est l'heure de laisser la réalité derrière toi et de plonger dans le monde de {game.name} !"
],
gameChange: [
'Après avoir dit au revoir à {oldGame.name}. Le moment est venu de jouer à {newGame.name} ! Quelles aventures nous attendent cette fois-ci ?'
]
}
},
autoRoles: {
enabled: false,
Expand Down

0 comments on commit 45b1980

Please sign in to comment.