Skip to content

Commit

Permalink
Merge pull request #63 from sopel-irc/msg-deprecated
Browse files Browse the repository at this point in the history
Replace deprecated calls to `msg()` with `say()`
  • Loading branch information
dgw authored Mar 9, 2020
2 parents 36f25c6 + fccd7b0 commit 4cdcbf5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions sopel_modules/github/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def configure_repo_messages(bot, trigger):
'''
allowed = bot.channels[trigger.sender].privileges.get(trigger.nick, 0) >= OP
if not allowed and not trigger.admin:
return bot.msg(trigger.sender, 'You must be a channel operator to use this command!')
return bot.say('You must be a channel operator to use this command!')

if not trigger.group(2):
return bot.say(configure_repo_messages.__doc__.strip())
Expand Down Expand Up @@ -393,7 +393,7 @@ def configure_repo_colors(bot, trigger):
'''
allowed = bot.channels[trigger.sender].privileges.get(trigger.nick, 0) >= OP
if not allowed and not trigger.admin:
return bot.msg(trigger.sender, 'You must be a channel operator to use this command!')
return bot.say('You must be a channel operator to use this command!')

if not trigger.group(2):
return bot.say(configure_repo_colors.__doc__.strip())
Expand Down
6 changes: 3 additions & 3 deletions sopel_modules/github/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,17 @@ def get_targets(repo):
def process_payload(payload, targets):
if payload['event'] == 'ping':
for row in targets:
sopel_instance.msg(row[0], '[{}] {}: {} (Your webhook is now enabled)'.format(
sopel_instance.say('[{}] {}: {} (Your webhook is now enabled)'.format(
fmt_repo(payload['repository']['name'], row),
fmt_name(payload['sender']['login'], row),
payload['zen']))
payload['zen']), row[0])
return

for row in targets:
messages = get_formatted_response(payload, row)
# Write the formatted message(s) to the channel
for message in messages:
sopel_instance.msg(row[0], message)
sopel_instance.say(message, row[0])


@bottle.get("/webhook")
Expand Down

0 comments on commit 4cdcbf5

Please sign in to comment.