Lets make a strike command

Md Shahriyar Alam

4 days 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.


  • Name: strike
  • Description: Give strike to a member


  • Name: target
  • Description: The target member to strike
  • Type: MEMBER



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"




Now you can run this command and give strike to member

/strike @Shahriyar

Need help?

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
logoCustom Commands

#1 Custom commands discord bot available on the internet

We Accept



20-22 Wenlock RoadEnglandN1 7GU

© WEiRDSOFT LTD. All rights reserved.