Added member deletion
This commit is contained in:
parent
d93e0fda4a
commit
da19933b5e
@ -213,7 +213,7 @@ async def system_delete(conn, message, args):
|
|||||||
|
|
||||||
await client.send_message(message.channel, "Are you sure you want to delete your system? If so, reply to this message with the system's ID (`{}`).".format(system["hid"]))
|
await client.send_message(message.channel, "Are you sure you want to delete your system? If so, reply to this message with the system's ID (`{}`).".format(system["hid"]))
|
||||||
|
|
||||||
msg = await client.wait_for_message(author=message.author, channel=message.channel)
|
msg = await client.wait_for_message(author=message.author, channel=message.channel, timeout=60.0)
|
||||||
if msg.content == system["hid"]:
|
if msg.content == system["hid"]:
|
||||||
await db.remove_system(conn, system_id=system["id"])
|
await db.remove_system(conn, system_id=system["id"])
|
||||||
return True, "System deleted."
|
return True, "System deleted."
|
||||||
@ -351,6 +351,17 @@ async def member_proxy(conn, message, member, args):
|
|||||||
await db.update_member_field(conn, member_id=member["id"], field="suffix", value=suffix)
|
await db.update_member_field(conn, member_id=member["id"], field="suffix", value=suffix)
|
||||||
return True, "Proxy settings updated." if prefix or suffix else "Proxy settings cleared."
|
return True, "Proxy settings updated." if prefix or suffix else "Proxy settings cleared."
|
||||||
|
|
||||||
|
@member_command("member delete", description="Deletes a member from your system ***permanently***.", category="Member commands")
|
||||||
|
async def member_delete(conn, message, member, args):
|
||||||
|
await client.send_message(message.channel, "Are you sure you want to delete {}? If so, reply to this message with the member's ID (`{}`).".format(member["name"], member["hid"]))
|
||||||
|
|
||||||
|
msg = await client.wait_for_message(author=message.author, channel=message.channel, timeout=60.0)
|
||||||
|
if msg.content == member["hid"]:
|
||||||
|
await db.delete_member(conn, member_id=member["id"])
|
||||||
|
return True, "Member deleted."
|
||||||
|
else:
|
||||||
|
return True, "Member deletion cancelled."
|
||||||
|
|
||||||
@command(cmd="message", usage="<id>", description="Shows information about a proxied message. Requires the message ID.", category="Message commands")
|
@command(cmd="message", usage="<id>", description="Shows information about a proxied message. Requires the message ID.", category="Message commands")
|
||||||
async def message_info(conn, message, args):
|
async def message_info(conn, message, args):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user