Md Shahriyar Alam
2 months ago
Lets make a /strike
command which we can use to strike a member
and if the member gets more than 3 strikes the bot will kick him.
Pre
pyrequire_permission("administrator") # You can also use allowed_roles()
current_strikes = member_var("strikes", member=target.id, default=0)
new_strikes = number(current_strikes) + 1
remaining_strikes = 3 - new_strikes
update_member_var("strikes", new_strikes, member=target.id)
response = (
f"{target.mention} has been striked. Total strikes **{new_strikes}**\n"
f"If you get **{remaining_strikes}** more strikes you will get kicked from this server."
)
if new_strikes >= 3:
kick_member(target, message=f"You got {new_strikes} strikes and kiked from {server.name}")
response = f"{target} has been kicked from the server for getting 3 strikes"
Content
py{response}
Now you can run this command and give strike to member
/strike @Shahriyar
If you still need any kind of help, have a suggestion for us or having a question in mind? Feel free to reach us out.
Join support server#1 Custom commands discord bot available on the internet
20-22 Wenlock RoadEnglandN1 7GU
© WEiRDSOFT LTD. All rights reserved.