def on_server_join(server):
try:
cursor.execute("INSERT INTO server (serverID, state) VALUES (?, ?)", (server.id, 'off'))
conn.commit()
except sqlite3.IntegrityError:
print ("Already in database")
embed = discord.Embed(title = "Hi there !", description="**Nice to meet you, I'm Uso!**\nMy command prefix is ``" + commandPrefix + "``\nIf you want to know what am i capable of, try ``" + commandPrefix + "help``\nAdmins : you can mute me if needed by doing ``" + commandPrefix + "mute on``\n\nAdd the bot to your server [Here](https://discordapp.com/oauth2/authorize?client_id=318357311951208448&scope=bot&permissions=8)\nI'm also avaiable ingame ! Look for UsoBot\nYou can come to my own server to have some help if nedded or even support the devs :D\n?https://discord.gg/Qsw3yD5\n\n:heart::heart::heart:Have fun evryone !:heart::heart::heart:")
embed.set_thumbnail(url = "https://cdn.discordapp.com/avatars/"+str(client.user.id)+"/"+str(client.user.avatar)+".png")
message = await client.send_message(client.get_server(server.id), embed = embed)
await Log(message, logLevel = 1, thumbnailUrl = server.icon_url, content = "**I've been added to a new server !**\n__Server name :__ **" + str(server.name) + "**\n__Server Id :__ **" + str(server.id) + "**\n__Users :__ **" + str(server.member_count) + "**\n__Owner name :__ **" + str(server.owner.name) + "**")
评论列表
文章目录