Skip to content

Commit

Permalink
refactored to use imports syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Supinic committed Jan 29, 2023
1 parent 9470f66 commit 50b3195
Show file tree
Hide file tree
Showing 18 changed files with 55 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "async-markov-experiment",
Events: ["message"],
Description: "Super experimental automatic async markov tester thing",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "automatic-unscramble",
Events: ["message"],
Description: "Attempts to auto-unscramble thepositivebot's unscramble minigame.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "chat-suggestion-linker",
Events: ["message"],
Description: "If a Supibot suggestion ID format is detected, posts a link to it - plus a github link, if the suggestion has one.",
Expand Down
32 changes: 0 additions & 32 deletions chat-modules/index.js

This file was deleted.

39 changes: 39 additions & 0 deletions chat-modules/index.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { definition as AsyncMarkovExperiment } from "./async-markov-experiment/index.mjs";
import { definition as AutomaticUnscramble } from "./automatic-unscramble/index.mjs";
import { definition as ChatSuggestionLinker } from "./chat-suggestion-linker/index.mjs";
import { definition as LiveDetection } from "./live-detection/index.mjs";
import { definition as MessageReaction } from "./message-react/index.mjs";
import { definition as OfflineOnlyMirror } from "./offline-only-mirror/index.mjs";
import { definition as OfflineOnlyMode } from "./offline-only-mode/index.mjs";
import { definition as PingSupi } from "./ping-supi/index.mjs";
import { definition as PyramidDetection } from "./pyramid-detection/index.mjs";
import { definition as RaidReaction } from "./raid-react/index.mjs";
import { definition as StreamPointsRedemption } from "./stream-points-redemptions/index.mjs";
import { definition as StreamerHealthNotification } from "./streamer-health-notification/index.mjs";
import { definition as SubscriptionReaction } from "./subscription-react/index.mjs";
import { definition as SilencePreventionTrigger } from "./supinic-silence-prevention-trigger/index.mjs";
import { definition as StreamDatabaseUpdater } from "./supinic-stream-db/index.mjs";
import { definition as WannaBecomeFamous } from "./wanna-become-famous/index.mjs";

const definitions = [
AsyncMarkovExperiment,
AutomaticUnscramble,
ChatSuggestionLinker,
LiveDetection,
MessageReaction,
OfflineOnlyMirror,
OfflineOnlyMode,
PingSupi,
PyramidDetection,
RaidReaction,
StreamPointsRedemption,
AsyncMarkovExperiment,
StreamerHealthNotification,
SubscriptionReaction,
SilencePreventionTrigger,
StreamDatabaseUpdater,
WannaBecomeFamous
];

export { definitions };
export default definitions;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "live-detection",
Events: ["online"],
Description: "Sends out PMs to all users subbed to the live event, whenever a channel set up there goes live.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "message-react",
Events: ["message"],
Description: "According to arguments, reacts to a specific message(s) with a determined response.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "offline-only-mirror",
Events: ["online", "offline"],
Description: "This module manages channel mirrors so that they are only in effect when the channel is offline.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "offline-only-mode",
Events: ["online", "offline"],
Description: "Makes Supibot go into Read-only mode when the channel is online. Reverts back when the channel goes offline.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "ping-supi",
Events: ["message"],
Description: "This module notifies Supinic whenever he is mentioned (in any channel, across platforms) via Twitch whispers.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "pyramid-detection",
Events: ["message"],
Description: "Detects \"pyramids\" in chat. Congratulates the persons who finishes one and demeans the persons who break one.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "raid-react",
Events: ["raid"],
Description: "According to arguments, reacts to a Twitch channel being raided.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "stream-points-redemptions",
Events: ["message"],
Description: "Reacts to redemptions",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "streamer-health-notification",
Events: ["online", "offline"],
Description: "Sets up a periodic \"health notification\" when the channel goes live, and removes it when going offline.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "subscription-react",
Events: ["subscription"],
Description: "According to arguments, reacts to a subscription in a Twitch channel.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "supinic-silence-prevention-trigger",
Events: ["online", "offline"],
Description: "Toggles the silence-prevention cron on/off on Supinic's stream going on/off.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "supinic-stream-db",
Events: ["online", "offline"],
Description: "Creates and updates database rows of Streams on Supinic's channel as he goes on/offline.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export const definition = {
Name: "wanna-become-famous",
Events: ["message"],
Description: "Bans various spam or follow bots.",
Expand Down

0 comments on commit 50b3195

Please sign in to comment.