Change MPP bot config file location, fix channels in said config, and add a check to make sure we only chat in the desired channel
This commit is contained in:
parent
c835b0b979
commit
a92873a613
|
@ -1,13 +0,0 @@
|
|||
# - uri: wss://mppclone.com:8443
|
||||
# channel:
|
||||
# id: "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧"
|
||||
# allowColorChanging: true
|
||||
# - uri: wss://mppclone.com:8443
|
||||
# channel:
|
||||
# id: "test/fishing"
|
||||
# allowColorChanging: true
|
||||
|
||||
- uri: wss://mppclone.com:8443
|
||||
channel:
|
||||
id: "keller room"
|
||||
allowColorChanging: true
|
|
@ -0,0 +1,8 @@
|
|||
- uri: wss://mppclone.com:8443
|
||||
channel:
|
||||
id: "✧𝓓𝓔𝓥 𝓡𝓸𝓸𝓶✧"
|
||||
allowColorChanging: true
|
||||
- uri: wss://mppclone.com:8443
|
||||
channel:
|
||||
id: "test/fishing"
|
||||
allowColorChanging: true
|
|
@ -51,11 +51,19 @@ export class MPPNetBot {
|
|||
this.logger.info(
|
||||
`Received channel update for channel ID "${msg.ch._id}"`
|
||||
);
|
||||
|
||||
if (msg._id !== this.config.channel.id) {
|
||||
this.client.setChannel(this.config.channel.id);
|
||||
}
|
||||
});
|
||||
|
||||
this.client.on("a", async msg => {
|
||||
let prefixes: string[];
|
||||
|
||||
if (this.client.channel._id !== this.config.channel.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
prefixes = await this.trpc.prefixes.query();
|
||||
} catch (err) {
|
||||
|
|
|
@ -6,7 +6,7 @@ const logger = new Logger("big brain");
|
|||
|
||||
const bots: MPPNetBot[] = [];
|
||||
|
||||
const defaults = loadConfig("config/bots.yml", [
|
||||
const defaults = loadConfig("config/mpp_bots.yml", [
|
||||
{
|
||||
uri: "wss://mppclone.com:8443",
|
||||
channel: {
|
||||
|
|
Loading…
Reference in New Issue