我目前正在制造一个不和谐的机器人,允许你主办一个西蒙说的事件!然而,目前,我有一个问题:
如果您执行,ss startevent (启动新事件的命令),我将运行以下代码:
if (args[0].toLowerCase() === "startevent") {
if (permissionLevel(message.member) < 4) return message.channel.send("**Error:** You don't have permission to do this!");
var ssChannel = message.guild.channels.cache.find(ch => ch.name === "simon-says");
if (!(ssChannel)) return message.channel.send("**Error:** Couldn't find the Simon Says channel!");
if (!(eventStatus(ssChannel) === "Inactive")) return message.channel.send("**Error:** There is already an event active!");
// ssChannel.updateOverwrite(message.guild.roles.cache.find(role => role.name === "Verified"), {
// SEND_MESSAGES: false,
// VIEW_CHANNEL: true,
// READ_MESSAGE_HISTORY: true
// });
var startingTopic = updateStatus(ssChannel, "Starting");
ssChannel.setTopic(startingTopic);
ssChannel.setTopic("**DEBUG**");
message.channel.send("**Succesfully started a new Simon Says event!**");
ssChannel.send(`Starting a new **Simon Says** event in **5 minutes**! To enter the event, go to <#703168301634945097> and type: **${prefix}ss enter**!`);
setTimeout(function () {
ssChannel.send(`Starting a new **Simon Says** event in **1 minute**! To enter the event, go to <#703168301634945097> and type: **${prefix}ss enter**!`);
setTimeout(function () {
ssChannel.updateOverwrite(message.guild.roles.cache.find(role => role.name === "SS: Participant"), {
SEND_MESSAGES: true,
VIEW_CHANNEL: true,
READ_MESSAGE_HISTORY: true
});
ssChannel.updateOverwrite(message.guild.roles.cache.find(role => role.name === "Verified"), {
SEND_MESSAGES: false,
VIEW_CHANNEL: false,
READ_MESSAGE_HISTORY: false
});
var activeTopic = updateStatus(ssChannel, "Active");
ssChannel.setTopic(activeTopic);
ssChannel.send(`The **Simon Says** event has started! You can now talk!`);
ssChannel.send("[<@&787000309108965418>]")
}, 60000)
}, 240000)
}因此,您可以看到我更新了通道的主题,为了调试,我甚至将它更改为“调试”。但是,它不会更新主题。这个话题只是保持不变,没有更新。
发布于 2020-12-14 19:35:29
最近,不和改变了他们对频道名称和主题的费率限制。截至2020年2月28日,他们已将编辑频道名称和主题的速度限制在每个频道每10分钟更新2次。不久前,他们在不和谐的开发者服务器上宣布了这一点。
https://stackoverflow.com/questions/65291206
复制相似问题