\# another-discord-vision



Discord.py kernel for:

\- sessions

\- button routing

\- game-agnostic anti-cheat



\## Install (local)

pip install -e .



\## Usage

```python

import discord

from discord.ext import commands

import another.discord.vision as vision

from another.discord.vision import anticheat



bot = commands.Bot(command\_prefix="!", intents=discord.Intents.all())

v = vision.Vision(bot)



ac = anticheat.AntiCheat()



@ac.rule("no-swear")

def no\_swear(msg, ctx):

&nbsp;   return anticheat.matchers.contains\_any(msg.content, \["كلمة\_ممنوعة"])



v.use\_anticheat(ac)



@v.on\_button("mygame")

async def handle(btn: vision.ButtonCtx):

&nbsp;   await btn.interaction.response.send\_message(f"act={btn.action} payload={btn.payload}", ephemeral=True)



bot.run("TOKEN")

