Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 4.35 KB

README.en.md

File metadata and controls

67 lines (42 loc) · 4.35 KB

Yunzai-Bot giveTitle plugin (by .js)

I'm sorry to tell you that , due to my laziness , all texts below are translated by Baidu Translate . If you can not read Chinese , I suggest that you should just install giveTitle.js into Yunzai-Bot/plugins/example . But if you can read Chinese , opening the README.md is recommended . Of course , if you 闲得慌 , I won't stop you keep reading .

Introduction

According to xiaoxue-plugin The title function of is rewritten, which does not depend on the original plug-in, and is applicable to Yunzai-Bot v3

Installation Tutorial

  1. Put giveTitle.js into Yunzai-Bot/plugins/example
  2. Restart Yunzai-Bot

instructions

Ask for exclusive title:#?((我要|(给|赐|赠|赏|送)(我|咱|朕|俺|愚|私|吾|鄙|敝|卑|爹|娘|爸|妈|爷|奶|哥|姐|弟|妹)))?头衔(.)*$

Cancel exclusive title:#?(我不要|取消|撤销|删除)头衔了?$

Considering that regularity is not viewed by people, here are some examples of command usage:

First, an example of setting a title

设置头衔

If the picture does not load correctly, please click here

Then there is the example of removing the title

撤销头衔

If the picture does not load correctly, please click here

What have I changed?

First of all, emphasize the original address Xiaoxue plug-in

  1. Make command matching more user-friendly, and add a bunch of regular and several functions
  2. Delete the "getXiaoxuePermissionLevel" of the original plug-in Reason for deletion: This restriction is not required for individuals
  3. Deleted the duplicate title judgment 'isHisTitle'Reason for deletion: The same group can have the same exclusive title, and individuals do not need this restriction
  4. Deleted the 'getGroupMemberTitleList' for saving all member titles Reason for deletion: This function is originally used to judge duplicate titles, so it is unnecessary
  5. Delete to judge whether the title the user asks for is his current title 'isGaveTitle'Reason for deletion: Not needed by individuals
  6. Rewrote the title setting process: -If the title requested by the user is too long, cut the text first, and inform the limit of the exclusive title in the prompt of successful setting

当你索要了过长的头衔

  • The robot nickname is deleted from the prompt of setting failure${tools.botName}Reason for deletion: not required by individuals. In addition, if you want to maintain this function, it is more difficult to use it as a js plug-in alone. If necessary, you should download original plug-in 原插件设置失败时 改写后
  • The title content requested by the user is added to the prompt of successful setting to facilitate debugging and let the user know how their commands are recognized in time.

设置成功增加提示

  • Deleted the prompt when using the corresponding command for private chat Reason for deletion: My bot disabled private chat long ago to avoid unprovoked blocking. I suggest you do the same
  1. There may be other changes, I forgot. But if you forget, it means it's not important. If you care, you can go to the code~

Encounter problems/need to contact me/need to use Bot

QQ group 638077675

answer 火花骑士

群