我正在使用Spring Boot Spring Boot 2.04,我们正在使用postgresql,那里有多个数据源。
我们正在利用import random
import asyncio
import aiohttp
import discord
import json
from discord import Game
from discord.ext.commands import Bot
TOKEN = ''
client = discord.Client()
botnum = 0
@client.event
async def on_ready():
print('Online and Ready to Play!')
print(client.user.name)
print(client.user.id)
await client.change_presence(game=discord.Game(name="With Emotions"))
print('------')
@client.event
async def on_message(message):
global botnum
# we do not want the bot to reply to itself
if message.author == client.user:
return
elif message.content.startswith('Peribot'): ### Updated to elif which is more acceptable
msg = "I'm Busy! D:<".format(message)
await client.send_message(message.channel, msg)
elif botnum == 20: ### forgot a ":" and Updated to elif which is more acceptable
msg = "You Clods are so loud!".format(message)
await client.send_message(message.channel, msg)
botnum = 0 ### you were comparing and not setting botnum to 0
else:
botnum += 1 ### This will add 1 to the preexisting number of botnum
elif message.content.startswith('info'): ### Updated to elif which is more acceptable
msg = "Created by Popleoma with the intent of being a fun bot. Commands are Peribot, info, and more to come!".format(message)
await client.send_message(message.channel, msg)
client.run("")
在服务启动时加载所有DS。
我正在寻找一种无需重新启动服务即可重新加载值的方法,以添加/删除DS。