Skip to content

Commit

Permalink
fix(plugin-common): do not welcome self
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Mar 11, 2020
1 parent 573bbd7 commit 49aee5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-common/src/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const defaultMessage = (meta: Meta<'notice'>) => `欢迎新大佬 [CQ:at,qq=${me

export default function apply (ctx: Context, message: WelcomeMessage = defaultMessage) {
ctx.receiver.on('group-increase', async (meta) => {
if (meta.userId === ctx.app.selfId) return
if (ctx.database) {
const group = await ctx.database.getGroup(meta.groupId, 0, ['assignee'])
if (group.assignee !== ctx.app.selfId) return
Expand Down

0 comments on commit 49aee5f

Please sign in to comment.