static L dm_discord_contextAroundLine(long msgID, int i, int j) { ret dm_discord_contextAroundLine(dm_call(dm_gazelle_linesCRUD(), 'lineForID, msgID), i, j); } static L dm_discord_contextAroundLine(O line, int i, int j) { if (line == null) null; long channelID = toLong(call(line, 'channelID)); if (channelID == 0) null; L lines = cast dm_call(dm_gazelle_linesCRUD(), 'linesInChannel, channelID); int idx = indexOf(lines, line); if (idx < 0) ret null with print("Line not found in channel " + channelID); ret subList(lines, idx+i, idx+j); }
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021961 |
Snippet name: | dm_discord_contextAroundLine - uses unimported lines |
Eternal ID of this version: | #1021961/2 |
Text MD5: | 5bf0b2f36ad54c8f0b58654c518e2174 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-04 11:04:47 |
Source code size: | 569 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 248 / 285 |
Version history: | 1 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |