Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple custom prefix handler for discord .Net bot

License

NotificationsYou must be signed in to change notification settings

NascuBB/ShablePrefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple custom prefix handler on c# for discord bot

possibilities:

  • Discord.NET compatible
  • up to 500 servers(actually unlimited count of servers, but response speed decreases(depends on cpu))
  • Default prefix
  • simple to use

How to use:

To connect custom prefixes to your bot you need:

usingShablePrefics;...//when bot is readyprivateasyncTaskOnReady(){/*            if you connecting Shable prefix first time,            before checking you must to create json file for guilds and their prefixes.            Just write await Prefix.StartShable(), and you don't have to touch it anymore.            */awaitPrefix.StartShable();//ready stuff}...//your command handlerprivateasyncTaskHandleCommandAsync(SocketMessagerawMessage){//your code/*            when you're checking for prefix you must replace your default string prefix with            await Prefix.GetPrefix(guild that requested(Example: context.Guild), default prefix of your bot)            */if(message.HasStringPrefix(awaitPrefix.GetPrefix(context.Guild,_defaultPrefics),refargPos)&&!(message.HasMentionPrefix(_client.CurrentUser,refargPos))){//command responding etc}}

see more indocs

About

Simple custom prefix handler for discord .Net bot

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp