mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-29 22:27:31 +00:00
style(extension): 为 getBotToken 设置 SuppressWarnings 用于忽略无关的弃用警告.
根据文档说明, 弃用仅针对重写方法, 对方法的使用并无大碍.
This commit is contained in:
parent
8b76a9aa9b
commit
2db0b78962
@ -24,7 +24,9 @@ public class AbilityBots {
|
||||
* @return 返回 AbilityBot 的账户 Id.
|
||||
* @throws IllegalArgumentException 当 AbilityBot 的 botToken 格式错误时抛出该异常.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static long getBotAccountId(BaseAbilityBot bot) {
|
||||
// 根据文档说明, 弃用仅针对重写方法, 使用该方法并无大碍.
|
||||
String botToken = bot.getBotToken();
|
||||
Matcher matcher = botTokenPattern.matcher(botToken);
|
||||
if (!matcher.matches()) {
|
||||
|
Loading…
Reference in New Issue
Block a user