!CVBVDaPiHphjTxEKuI:matrix.org

opsdroid-general

121 Members
40 Servers

Load older messages


SenderMessageTime
12 Jun 2021
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) The print? 18:12:15
@sloth56:chat.mountainview.theworkpc.comSleuthprint18:12:17
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) Print isn't awaitable 18:12:40
@sloth56:chat.mountainview.theworkpc.comSleuthI ended up just using a wild card match_regex18:12:46
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) It's probably best to use logging rather than print anyway 18:12:51
@sloth56:chat.mountainview.theworkpc.comSleuthWhat is always meant for?18:12:59
@sloth56:chat.mountainview.theworkpc.comSleuth
In reply to @_slack_opsdroid_U5MK1BW83:matrix.org
Print isn't awaitable
I'm not awaiting it
18:13:12
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) If you want to write a skill which inspects every event which gets processed. 18:13:52
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) There's an example skill where you can ask the bot when was the last time they saw a certain user. Always is used to update the datetime for each user. 18:14:35
@sloth56:chat.mountainview.theworkpc.comSleuthThat's the seen skills I believe it's called. It's broken last time I tried it a couple of months ago.18:16:01
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) Heh fair enough. We probably need to fix that. 18:16:29
@sloth56:chat.mountainview.theworkpc.comSleuthOnce my schedule opens up a bit I would like to write some more examples using other opsdroid features. So we can better nail down getting new users on boarded and acquainted with the feature sets. This was/is a main pain point for me when starting new projects with opsdroid.18:17:53
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) That would be awesome 18:18:38
@sloth56:chat.mountainview.theworkpc.comSleuth

Any idea why this error just came up?

opsdroid_1  | Traceback (most recent call last):
opsdroid_1  |   File "/usr/local/lib/python3.8/site-packages/opsdroid/core.py", line 463, in run_skill
opsdroid_1  |     return await skill(self, config, event)
opsdroid_1  |   File "/usr/local/lib/python3.8/site-packages/opsdroid/skill/__init__.py", line 8, in decorated_skill
opsdroid_1  |     return func(*args, **kwargs)
opsdroid_1  | TypeError: last_seen() takes 3 positional arguments but 4 were given
  @match_regex(r'(?P<string>.*)', case_sensitive=False)
  async def last_seen(opsdroid, config, message):
    string = message.regex.group('string')
    # await opsdroid.memory.put(str(message.target), string)
    previousKey = None

    try:
      previousKey = str(await message.raw_event)
    except KeyError:
      pass

    if (previousKey != None):
      await message.respond(previousKey)
    else:
      await message.respond("Nothing.")
    # await message.respond(str(await opsdroid.memory.get(str(message.target))))
21:16:39
@sloth56:chat.mountainview.theworkpc.comSleuth *

Any idea why this error just came up?

opsdroid_1  | Traceback (most recent call last):
opsdroid_1  |   File "/usr/local/lib/python3.8/site-packages/opsdroid/core.py", line 463, in run_skill
opsdroid_1  |     return await skill(self, config, event)
opsdroid_1  |   File "/usr/local/lib/python3.8/site-packages/opsdroid/skill/__init__.py", line 8, in decorated_skill
opsdroid_1  |     return func(*args, **kwargs)
opsdroid_1  | TypeError: last_seen() takes 3 positional arguments but 4 were given
  @match_regex(r'(?P<string>.*)', case_sensitive=False)
  async def last_seen(opsdroid, config, message):
    string = message.regex.group('string')
    # await opsdroid.memory.put(str(message.target), string)
    previousKey = None

    try:
      previousKey = str(await message.raw_event)
    except KeyError:
      pass

    if (previousKey != None):
      await message.respond(previousKey)
    else:
      await message.respond("Nothing.")
    # await message.respond(str(await opsdroid.memory.get(str(message.target))))
21:17:15
@sloth56:chat.mountainview.theworkpc.comSleuthI think it's in the function but I'm not sure. I tried a known working function and that didn't work either. So then I reset the matrix account and still no luck.21:29:23
15 Jun 2021
@sloth56:chat.mountainview.theworkpc.comSleuthWell, after way to long I found the issue. I must have removed the self by accident at some point. Time to init git on this project! The things you think that you'd check after coding for years.06:18:03
@mpanait:matrix.orgMihai Panaitis possible to use an database with opsdroid to search and return some value?08:02:15
@_slack_opsdroid_U5MK1BW83:matrix.orgJacob Tomlinson (Slack) Sure. Opsdroid is just a framework for building automations. What you put inside your skills is your business. 08:19:09
@mpanait:matrix.orgMihai Panaitthx08:43:49
@sloth56:chat.mountainview.theworkpc.comSleuthCadair can a bot react to a message more than once? So for example if you wanted a bot to post a message in multiple rooms and synchronize the reactions that users put on that post and their is 3 👍. Would the bot be able to 👍 the other postes 3 times?13:39:25
@cadair:cadair.comCadairNo, all reactions are limited to one per account server side.13:40:17
@solardrew:openastronomy.orgSolarDrewthat's a matrix limitation rather than an opsdroid one though, right? no reason you couldn't do this in principle if you're using a service that supports it?13:41:14
@sloth56:chat.mountainview.theworkpc.comSleuthOk13:41:26
@sloth56:chat.mountainview.theworkpc.comSleuth
In reply to @solardrew:openastronomy.org
that's a matrix limitation rather than an opsdroid one though, right? no reason you couldn't do this in principle if you're using a service that supports it?
Yes, that's the server in this case
13:41:53
@sloth56:chat.mountainview.theworkpc.comSleuthOr multiple users on matrix13:42:13
16 Jun 2021
@sloth56:chat.mountainview.theworkpc.comSleuthIs their a way to send a message in a matrix room without receiving one first? Two examples. The first just send an unsolicited message to a specific room listed in the configuration.yaml file. The second being once the bot joins a room display a help message01:47:16
@sloth56:chat.mountainview.theworkpc.comSleuthTheir has to be some docs on this stuff right?01:51:24
@sloth56:chat.mountainview.theworkpc.comSleuth

So I found @match_event(JoinRoom) but I can't get it to work because I can't find anything about it.

  @match_event(JoinRoom)
  async def on_join(self, join):
    _LOGGER.info(str(join))

AttributeError: 'NoneType' object has no attribute 'connector'

03:00:03
@sloth56:chat.mountainview.theworkpc.comSleuth *

So I found @match_event(JoinRoom) but I can't get it to work because I can't find anything about it.

  @match_event(JoinRoom)
  async def on_join(self, join):
    _LOGGER.info(str(join))

AttributeError: 'NoneType' object has no attribute 'connector'

03:00:18

There are no newer messages yet.


Back to Room List