Browse Source

fix panic

push-params
Evan Feenstra 4 years ago
parent
commit
d74f679179
  1. 2
      api/builtin/mother.ts
  2. 2
      api/builtin/welcome.ts
  3. 2
      dist/api/builtin/mother.js
  4. 2
      dist/api/builtin/mother.js.map
  5. 2
      dist/api/builtin/welcome.js
  6. 2
      dist/api/builtin/welcome.js.map

2
api/builtin/mother.ts

@ -35,7 +35,7 @@ export function init() {
client.login('_', finalAction) client.login('_', finalAction)
client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => { client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => {
const arr = message.content.split(' ') const arr = (message.content && message.content.split(' ')) || []
if (arr.length < 2) return if (arr.length < 2) return
if (arr[0]!=='/bot') return if (arr[0]!=='/bot') return
const cmd = arr[1] const cmd = arr[1]

2
api/builtin/welcome.ts

@ -16,7 +16,7 @@ export function init() {
client.login('_', finalAction) client.login('_', finalAction)
client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => { client.on(msg_types.MESSAGE, async (message: Sphinx.Message) => {
const arr = message.content.split(' ') const arr = (message.content && message.content.split(' ')) || []
console.log('message.type',message.type) console.log('message.type',message.type)
const isGroupJoin = message.type===constants.message_types.group_join const isGroupJoin = message.type===constants.message_types.group_join
if (arr.length < 2 && !isGroupJoin) return if (arr.length < 2 && !isGroupJoin) return

2
dist/api/builtin/mother.js

@ -39,7 +39,7 @@ function init() {
const client = new Sphinx.Client(); const client = new Sphinx.Client();
client.login('_', actions_1.finalAction); client.login('_', actions_1.finalAction);
client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () { client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () {
const arr = message.content.split(' '); const arr = (message.content && message.content.split(' ')) || [];
if (arr.length < 2) if (arr.length < 2)
return; return;
if (arr[0] !== '/bot') if (arr[0] !== '/bot')

2
dist/api/builtin/mother.js.map

File diff suppressed because one or more lines are too long

2
dist/api/builtin/welcome.js

@ -23,7 +23,7 @@ function init() {
const client = new Sphinx.Client(); const client = new Sphinx.Client();
client.login('_', actions_1.finalAction); client.login('_', actions_1.finalAction);
client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () { client.on(msg_types.MESSAGE, (message) => __awaiter(this, void 0, void 0, function* () {
const arr = message.content.split(' '); const arr = (message.content && message.content.split(' ')) || [];
console.log('message.type', message.type); console.log('message.type', message.type);
const isGroupJoin = message.type === constants.message_types.group_join; const isGroupJoin = message.type === constants.message_types.group_join;
if (arr.length < 2 && !isGroupJoin) if (arr.length < 2 && !isGroupJoin)

2
dist/api/builtin/welcome.js.map

@ -1 +1 @@
{"version":3,"file":"welcome.js","sourceRoot":"","sources":["../../../api/builtin/welcome.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAoC;AACpC,oDAAoD;AACpD,sCAAkC;AAClC,6BAA4B;AAC5B,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAA;AAEjC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC,CAAA;AAE9E,IAAI,OAAO,GAAG,KAAK,CAAA;AAEnB,SAAgB,IAAI;IAClB,IAAG,OAAO;QAAE,OAAM;IAClB,OAAO,GAAG,IAAI,CAAA;IAEd,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,CAAA;IAClC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,qBAAW,CAAC,CAAA;IAE9B,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAO,OAAuB,EAAE,EAAE;QAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QACtC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACxC,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,KAAG,SAAS,CAAC,aAAa,CAAC,UAAU,CAAA;QACrE,IAA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