Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 15 09:16
    jaraco commented #198
  • Jul 15 09:14
    jaraco commented #196
  • Jul 15 09:13

    jaraco on v20.1.0

    (compare)

  • Jul 15 09:13

    jaraco on main

    Fixed the way the bot hangs if … Merge branch 'jaraco:main' into… Trigger the disconnection event… and 6 more (compare)

  • Jul 15 09:13
    jaraco closed #196
  • Jul 15 09:13
    jaraco synchronize #196
  • Jul 15 08:46
    jaraco closed #186
  • Jul 15 08:46
    jaraco commented #186
  • Jul 15 08:44
    jaraco synchronize #196
  • Jul 15 08:43
    jaraco synchronize #196
  • Jul 15 08:43

    jaraco on main

    (compare)

  • Jul 15 08:43

    jaraco on main

    Update changelog. (compare)

  • Jul 15 08:39

    jaraco on main

    Inject check job into CI workfl… Add Python 3.11 into the matrix… Update base URL for PEPs (#61) and 6 more (compare)

  • Jul 15 00:29
    fitnub-bosbud commented #196
  • Jul 15 00:29
    fitnub-bosbud commented #196
  • Jun 10 20:03
    minkyman1 commented #198
  • Jun 10 18:45
    minkyman1 opened #198
  • Feb 20 02:15

    jaraco on main

    Ran pre-commit autoupdate Merge https://github.com/jaraco… ⚫ Fade to black. (compare)

  • Feb 20 02:09
    jaraco labeled #197
  • Feb 20 02:09

    jaraco on main

    Suppress DeprecationWarning unt… (compare)

Jason R. Coombs
@jaraco
@TurBoss: I’m not sure. Bots I’ve written have ignored those messages (incidentally). I think you need to add an on_action handler to your bot.
Give that a try and let me know what you find.
TurBoss
@TurBoss
ok thanks
ok on_action works, reacts only to emots?
TurBoss
@TurBoss
ok its working Thank you @jaraco
Jason R. Coombs
@jaraco
Glad it’s working. I’m not sure where it might be used other than in /me messages.
TurBoss
@TurBoss
will discover
ry00001
@ry00001
How do you get started with python irc?
everyone is afk
hah
TurBoss
@TurBoss
hi @ry00000
ry00001
@ry00001
hi @TurBoss
TurBoss
@TurBoss
this is a very basic bot I did
ry00001
@ry00001
oh god this is super complex
TurBoss
@TurBoss
it bridges my irc server to matrix.org (aka Riot)
what do you want to do?
ry00001
@ry00001
make an extremely basic bot
TurBoss
@TurBoss
sek
is not too big
only 200 lines
this is the bot section
ry00001
@ry00001
ok
TurBoss
@TurBoss
you can copypaste that code
then init the IrcBot class in your main
ry00001
@ry00001
can i get an ircbot without matrix integration
TurBoss
@TurBoss
sure
jus remove this:
to line 68
ry00001
@ry00001
Where's the example bot code
Jason R. Coombs
@jaraco
@ry00000 You might also look at testbot.py in the IRC project for a super basic example, or pmxbot for a more complex example, though if TurBoss’ ircbot gets you going then that’s fantastic.
ry00001
@ry00001
What's the example bot's prefix supposed to be?
: doesn't work
ry00001
@ry00001
@jaraco what's the example bot's prefix? I tried : but it didn't work
Jason R. Coombs
@jaraco
In test_bot, it looks like the prefix needs to be the bot nickname followed by a colon, so if the bot’s name is mybot, the prefix should be mybot:thecommand.
ry00001
@ry00001
ah
Jason R. Coombs
@jaraco
Each incoming message is handled in on_pubmsg, so you can adapt that to whatever behavior you want.
ry00001
@ry00001
Oh
but on_command is the main cmd loop
Jason R. Coombs
@jaraco
I’m not following. on_command does not appear in the testbot.py script (nor the irc library), so you’re probably getting that from elsewhere.
ry00001
@ry00001
er, no, do_command
sorry
Jason R. Coombs
@jaraco
Oh, right. Well on_pubmsg parses the incoming messages, and detects if there’s a command (as above) and if so, dispatches that using do_command.
ry00001
@ry00001
how do i turn pylint off
it's getting annoying
how do I get arguments from a command?
say i have kick <user> <channel>