File tree Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Expand file tree Collapse file tree 4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-unused-vars */
2
+ const { permlevel,
3
+ } = require ( '../modules/functions.js' ) ;
4
+ const config = require ( '../config.js' ) ;
5
+ const nmv = require ( '@caspertech/node-metaverse' ) ;
6
+ const { MessageEmbed, WebhookClient } = require ( 'discord.js' ) ;
7
+ // The MESSAGE event runs anytime a message is received
8
+ // Note that due to the binding of client to every event, every event
9
+ // goes `client, other, args` when this function is run.
10
+
11
+ const { UUID } = nmv . UUID ;
12
+ module . exports = async ( client , ChatEvent ) => {
13
+ const SLbot = client . container . SLbot ;
14
+ const currentBot = process . env . SL_FIRSTNAME + ' ' + process . env . SL_LASTNAME ;
15
+
16
+ } ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-shadow */
1
2
/* eslint-disable no-unused-vars */
2
3
const { permlevel,
3
4
} = require ( '../modules/functions.js' ) ;
Original file line number Diff line number Diff line change @@ -14,11 +14,23 @@ const config = {
14
14
15
15
// //// This maps inworld group UUIDs to Discord Channels.
16
16
relays : new Map ( [
17
- [ " 1b6af450-96e2-8fad-291c-74fc4928f0b1" , " 1176644698027331745" ]
17
+ [ ' 1b6af450-96e2-8fad-291c-74fc4928f0b1' , ' 1176644698027331745' ] ,
18
18
] ) ,
19
19
// Array of SL UUIDs to Ignore and not relay, say if you have a bot that regularly posts in group chat or something.
20
20
'ignored' : [ '49d6a705-de90-4458-b166-ccf56401053c' ] ,
21
21
/*
22
+
23
+
24
+ Settings for local chat relay
25
+ */
26
+ // Enable Local Chat Relay
27
+ 'relayLocal' : true ,
28
+
29
+ // Discord Channel to Relay to
30
+ 'relayChannel' : '1176658491239305266' ,
31
+ /*
32
+
33
+
22
34
* Intents the bot needs.
23
35
* By default GuideBot needs Guilds and Guild Messages to work.
24
36
*/
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ client.container = {
50
50
} ;
51
51
52
52
const GroupChatEventHandler = require ( './SLevents/GroupChat.js' ) ;
53
+ const ChatEventHandler = require ( './SLevents/ChatEvent.js' ) ;
53
54
54
55
// We're doing real fancy node 8 async/await stuff here, and to do that
55
56
// we need to wrap stuff in an anonymous function. It's annoying but it works.
@@ -74,6 +75,10 @@ const init = async () => {
74
75
GroupChatEventHandler ( client , eventInfo ) ;
75
76
76
77
} ) ;
78
+ client . container . SLbot . clientEvents . onNearbyChat . subscribe ( ( eventInfo ) => {
79
+ ChatEventHandler ( client , eventInfo ) ;
80
+
81
+ } ) ;
77
82
78
83
79
84
} ) . catch ( ( error ) => {
You can’t perform that action at this time.
0 commit comments