我需要帮助:
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/api/**").authenticated()
.anyRequest().permitAll()
.and()
.httpBasic().and()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
}
错误列表:
我在不和谐服务器中输入的内容:
import discord
from discord.ext import commands
from discord.voice_client import VoiceClient
bot = commands.Bot(";")
@bot.command(pass_context=True)
async def sendm(member, sv, ch, *, msg):
serverd = member.server.id("{0}".format(sv))
channel = member.server.get_channel("{0}".format(ch))
await bot.send_message(serverd, channel, msg)
bot.run("TOKEN")
使用Raspberry Pi 3主持
答案 0 :(得分:0)
您正在传递上下文,这意味着第一个参数将是Context
对象,而不是Member
。只要邮件包含频道ID,您就不需要任何其他内容。
@bot.command()
async def sendm(ch, *, msg):
channel = bot.get_channel(ch)
if channel:
await bot.send_message(channel, msg)
else:
await bot.say('I can't find that channel')